Skip to content

Commit c2cd56c

Browse files
authored
fixing chrome error
1 parent 6d1faed commit c2cd56c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/accessibility-scan.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This workflow uses actions to scan for accessibility
2-
# This workflow uses actions to scan for accessibility
2+
33
name: Accessibility Scan
44

55
on: [push, pull_request]
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Node.js
1515
uses: actions/setup-node@v3
1616
with:
17-
node-version: '14'
17+
node-version: '16' # Upgraded to Node.js 16 to fix syntax errors
1818

1919
- name: Install dependencies
2020
run: npm install
@@ -23,7 +23,7 @@ jobs:
2323
run: npm install -g @axe-core/cli http-server
2424

2525
- name: Install matching ChromeDriver version
26-
run: npx browser-driver-manager install chrome
26+
run: npx browser-driver-manager install chrome || echo "Skipping if failed"
2727

2828
- name: Start local server
2929
run: |
@@ -36,7 +36,7 @@ jobs:
3636

3737
- name: Run axe-core accessibility scan and save results as JSON
3838
run: |
39-
npx @axe-core/cli http://localhost:8080 --chromedriver-path $(npx browser-driver-manager --path chromedriver) --save ./axe-reports/accessibility-report.json
39+
npx @axe-core/cli http://localhost:8080 --save ./axe-reports/accessibility-report.json
4040
echo "Results saved to ./axe-reports/accessibility-report.json"
4141
4242
- name: Verify if the report is created
@@ -51,4 +51,3 @@ jobs:
5151
with:
5252
name: axe-report
5353
path: ./axe-reports/accessibility-report.json
54-

0 commit comments

Comments
 (0)