Accessibility audit (production) #60
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 audit (production) | |
| # Audits the live production deployment of the CI Dashboard fixture | |
| # on every push to main and daily 12:00 UTC. PR previews are handled | |
| # separately in audit-pr.yml (which waits for Netlify and audits the | |
| # deploy preview URL). | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 12 * * *" # daily 12:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| security-events: write # SARIF → Code Scanning | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Cache chromium-headless-shell | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }} | |
| - uses: AccessLint/audit@v0 | |
| id: a11y | |
| with: | |
| url: https://accesslint-test-fixtures.netlify.app/ | |
| # The fixture is *intentionally* broken — drop to `minor` so the | |
| # report surfaces every documented violation, not just the | |
| # critical/serious ones. | |
| min-impact: minor | |
| - name: Show outputs | |
| run: | | |
| echo "violation-count: ${{ steps.a11y.outputs.violation-count }}" | |
| echo "critical: ${{ steps.a11y.outputs.critical-count }}" | |
| echo "serious: ${{ steps.a11y.outputs.serious-count }}" | |
| echo "failed: ${{ steps.a11y.outputs.failed }}" | |
| - name: Upload report artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: accesslint-report-${{ github.run_id }} | |
| path: | | |
| accesslint-report.json | |
| accesslint-report.md | |
| accesslint-report.sarif | |
| retention-days: 30 | |
| - name: Upload SARIF to Code Scanning | |
| if: always() | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: ${{ steps.a11y.outputs.report-sarif-path }} | |
| category: accesslint-prod | |
| - name: Comment on PR | |
| if: github.event_name == 'pull_request' | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: a11y | |
| path: accesslint-report.md |