notifications #310
Workflow file for this run
This file contains 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 (a11y) static tests with AXE | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
jobs: | |
axe: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Npm install | |
run: npm i --legacy-peer-deps && npm i local-web-server npm-run-all | |
- run: npm run build | |
- run: npx playwright install-deps && sudo apt-get install xsel -y | |
- run: npx playwright install | |
- name: Run Axe | |
run: ./node_modules/.bin/npm-run-all --parallel serve-docs test-a11y | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: ${{ always() }} | |
with: | |
path: tests/violations.md |