File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed
Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Accessibility Tests (pa11y)
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build :
10+ name : Building site and running accessibility tests
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout Source
15+ uses : actions/checkout@v2
16+
17+ - name : Setup Node
18+ uses : actions/setup-node@v1
19+ with :
20+ node-version : 18
21+ run : npm install -g yarn
22+ run : yarn install --frozen-lockfile
23+ run : yarn build
24+
25+ - name : Boot Next
26+ run : yarn build
27+ run : yarn start
28+
29+ - name : Run pa11y-ci
30+ run : yarn pa11y-ci:sitemap 2>&1 | tee pa11y_output.txt
31+
32+ - name : Read pa11y_output
33+ id : pa11y_output
34+ uses : juliangruber/read-file-action@v1
35+ with :
36+ path : ./pa11y_output.txt
37+
38+ ` ` ` ${{ steps.pa11y_output.outputs.content }}` ` `
39+
40+ </details>'
41+
42+ - name : Check for Failures
43+ if : contains(steps.pa11y_output.outputs.content, 'errno 2')
44+ run : |
45+ echo "::error::The site is failing accessibility tests."
46+ exit 1
Original file line number Diff line number Diff line change 1+ {
2+ "defaults": {
3+ "concurrency": 1,
4+ "standard": "WCAG2AA",
5+ "runners": [
6+ "axe",
7+ "htmlcs"
8+ ],
9+ "ignore": [
10+ "color-contrast",
11+ "frame-tested"
12+ ],
13+ "chromeLaunchConfig": {
14+ "args": [
15+ "--disable-dev-shm-usage",
16+ "--no-sandbox",
17+ "--disable-gpu"
18+ ]
19+ },
20+ "reporters": [
21+ "cli",
22+ [
23+ "./pa11y-reporter-junit.js",
24+ {
25+ "fileName": "./pa11y-report-junit.xml"
26+ }
27+ ]
28+ ]
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments