fix(companies): sort Status column by application status, not company… #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Component Structure Validation | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'src/components/**' | |
| - 'scripts/validate-structure.js' | |
| - '.github/workflows/component-structure.yml' | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - 'src/components/**' | |
| jobs: | |
| validate: | |
| name: Validate Component Structure | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.16.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Run component structure validation | |
| run: pnpm run validate:structure | |
| - name: Generate audit report | |
| if: failure() | |
| run: | | |
| node scripts/audit-components.js --path src/components --format json > component-audit.json | |
| node scripts/audit-components.js --path src/components --format markdown > component-audit.md | |
| - name: Upload audit report | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: component-audit-report | |
| path: | | |
| component-audit.json | |
| component-audit.md | |
| - name: Comment PR with audit results | |
| if: failure() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const report = fs.readFileSync('component-audit.md', 'utf8'); | |
| await github.rest.issues.createComment({ | |
| ...context.repo, | |
| issue_number: context.issue.number, | |
| body: `## ❌ Component Structure Validation Failed\n\n${report}\n\n### How to fix\n\nRun the following command locally:\n\`\`\`bash\npnpm run migrate:components\n\`\`\`` | |
| }); | |
| - name: Check compliance rate | |
| if: always() | |
| run: | | |
| # Run audit script directly to get clean JSON output | |
| REPORT=$(node scripts/audit-components.js --path src/components --format json) | |
| COMPLIANCE_RATE=$(echo "$REPORT" | jq '.summary.complianceRate') | |
| if [ "$COMPLIANCE_RATE" -lt 100 ]; then | |
| echo "⚠️ Component compliance rate is ${COMPLIANCE_RATE}%" | |
| echo "Run 'pnpm run migrate:components' to fix non-compliant components" | |
| else | |
| echo "✅ All components are compliant!" | |
| fi |