-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (45 loc) · 1.52 KB
/
axe-core.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: ♿️ A11Y CI with Axe Core
on:
pull_request:
paths:
- '**/.github/workflows/axe-core.yml'
- '.github/workflows/generate-site-preview.yml'
- 'src/**/*'
- 'package.json'
- 'package-lock.json'
- 'gatsby-*.js'
- '.nvmrc'
env:
WEBSITE_TO_AUDIT: 'https://process-analytics-process-analytics-dev-site_preview-pr-${{ github.event.pull_request.number }}.surge.sh/'
jobs:
Axe-CLI:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Chrome Driver
uses: nanasess/setup-chromedriver@v1
with:
chromedriver-version: '108.0.5359.71'
- name: Install Axe CLI
run: npm install -g @axe-core/cli
- name: Run Axe CLI
id: axe
uses: mathiasvr/command-output@v1
with:
run: axe $WEBSITE_TO_AUDIT --chromedriver-path="/usr/local/bin/chromedriver" --exit --tags wcag2aaa
- name: Comment pull request
if: always()
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
header: axe-core-comment
recreate: true
message: |
## ♿️ Axe report
Audited website : ${{ env.WEBSITE_TO_AUDIT }}
```
${{ steps.axe.outputs.stdout }}
${{ steps.axe.outputs.stderr }}
```
*This report has been generated using [@axe-core/cli](https://github.com/dequelabs/axe-core-npm/blob/develop/packages/cli).*