Skip to content

Created Github Workflow for Accessibility Testing (Using Axe) #6

Created Github Workflow for Accessibility Testing (Using Axe)

Created Github Workflow for Accessibility Testing (Using Axe) #6

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