Skip to content

chore: fixing readme format for the github pages context #6

chore: fixing readme format for the github pages context

chore: fixing readme format for the github pages context #6

Workflow file for this run

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.'
})