Created Github Workflow for Accessibility Testing (Using Axe) #6
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: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run build --if-present | |
- name: Start Docker Container | |
run: | | |
docker run -d -p 80:80 my-apache-server | |
sleep 5 # Wait for container to start | |
docker ps # Display running containers for debugging | |
- name: Run axe | |
run: | | |
npm install -g @axe-core/cli | |
axe http://localhost:80 --exit |