Created Github Workflow for Accessibility Testing (Using Axe) #10
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: axe | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
axe: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install wait-on | |
run: npm install --save wait-on | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm start & npx wait-on http://localhost:4010 | |
- name: Run axe | |
run: | | |
echo "Running axe-core accessibility checks..." | |
npm install -g @axe-core/cli | |
axe http://localhost:4010 --exit |