Skip to content

Merge pull request #345 from EscolaLMS/feature/SPRAW-95 #384

Merge pull request #345 from EscolaLMS/feature/SPRAW-95

Merge pull request #345 from EscolaLMS/feature/SPRAW-95 #384

Workflow file for this run

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