1818 - name : Install dependencies
1919 run : npm install
2020
21- - name : Install axe-cli and http-server
22- run : npm install -g axe-cli http-server
21+ - name : Install @ axe-core/ cli and http-server
22+ run : npm install -g @ axe-core/ cli http-server
2323
2424 - name : Start local server
2525 run : |
@@ -31,21 +31,21 @@ jobs:
3131 - name : Create axe-reports directory
3232 run : mkdir -p ./axe-reports
3333
34- - name : Run axe-cli accessibility scan with save flag
34+ - name : Run axe-core accessibility scan and save results as JSON
3535 run : |
36- npx axe-cli http://localhost:8080 --save --dir ./axe-reports
37- echo "Checking if the report was saved... "
36+ npx @ axe-core/ cli http://localhost:8080 --save ./axe-reports/accessibility-report.json
37+ echo "Results saved to ./axe-reports/accessibility- report.json "
3838
39- - name : List contents of axe-reports directory
39+ - name : Verify if the report is created
4040 run : |
4141 echo "Listing contents of the axe-reports directory:"
4242 ls -la ./axe-reports/
4343 echo "Attempting to read the report content:"
44- cat ./axe-reports/accessibility-report.html || echo "Report not created"
44+ cat ./axe-reports/accessibility-report.json || echo "Report not created"
4545
4646 - name : Upload axe-core report
4747 uses : actions/upload-artifact@v3
4848 with :
4949 name : axe-report
50- path : ./axe-reports/accessibility-report.html
50+ path : ./axe-reports/accessibility-report.json
5151
0 commit comments