feat(patterns): Category 04 -- empty-links-buttons [sticky-header-scr… #5
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: Axe Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "patterns/**" | |
| - "package.json" | |
| - "vitest.config.js" | |
| pull_request: | |
| paths: | |
| - "patterns/**" | |
| - "package.json" | |
| - "vitest.config.js" | |
| jobs: | |
| test: | |
| name: Run axe tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run axe tests | |
| run: npm test | |
| - name: Post axe results as PR comment | |
| if: failure() && github.event_name == 'pull_request' | |
| 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: '❌ **Axe tests failed.** Check the [Actions log](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.\n\nRemember: `before/` must fail axe and `after/` must pass axe for every pattern.' | |
| }) |