fix: cherry-pick eval fixes from TASK_11607 models A and B #172
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: Accessibility Testing | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| accessibility: | |
| runs-on: ubuntu-latest | |
| env: | |
| NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} | |
| NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} | |
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| TEST_USER_PRIMARY_PASSWORD: ${{ secrets.TEST_USER_PRIMARY_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.16.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build application | |
| run: pnpm run build | |
| - name: Run accessibility tests | |
| run: pnpm run test:a11y:ci | |
| - name: Run component accessibility tests (happy-dom) | |
| run: | | |
| # Run all accessibility tests except: | |
| # - Card (requires jsdom for canvas API) | |
| # RouteBuilder now included - OOM fixed via module aliases (see docs/specs/051-ci-test-memory) | |
| FILES=$(find src/components -name "*.accessibility.test.tsx" -type f \ | |
| ! -name "Card.accessibility.test.tsx" \ | |
| | tr '\n' ' ') | |
| echo "Running $(echo $FILES | wc -w) happy-dom accessibility test files" | |
| pnpm exec vitest run $FILES --no-file-parallelism --pool vmThreads | |
| env: | |
| NODE_OPTIONS: '--max-old-space-size=2048' | |
| - name: Run Card accessibility tests (jsdom) | |
| run: | | |
| echo "Running Card accessibility tests with jsdom" | |
| pnpm exec vitest run src/components/atomic/Card/Card.accessibility.test.tsx --project jsdom | |
| env: | |
| NODE_OPTIONS: '--max-old-space-size=2048' | |
| - name: Upload Pa11y screenshots | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pa11y-screenshots | |
| path: .pa11y-screenshots/ | |
| - name: Comment PR with results | |
| if: github.event_name == 'pull_request' && failure() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '❌ Accessibility tests failed. Please check the [workflow logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.' | |
| }) |