Skip to content

Commit b6c4b69

Browse files
authored
feat(sitemap): add sitemap crawl option (#40)
1 parent c4f2d1f commit b6c4b69

File tree

5 files changed

+12
-57
lines changed

5 files changed

+12
-57
lines changed

.github/workflows/action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
FAIL_TOTAL_COUNT: 10000
1414
EXTERNAL: false
1515
SITE_WIDE: true
16+
SITEMAP: true
1617
SUBDOMAINS: true
1718
TLD: true
1819
LIST: true

.github/workflows/bench-axe.yml

-19
This file was deleted.

.github/workflows/bench-pa11y.yml

-31
This file was deleted.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ Some of the primary features include pass/fail testing, code fixes, and detailed
99
### Usage
1010

1111
```yaml
12-
- uses: a11ywatch/github-action@v1.12.3
12+
- uses: a11ywatch/github-action@v1.13.0
1313
with:
1414
WEBSITE_URL: ${{ secrets.WEBSITE_URL }}
1515
SUBDOMAINS: true
16-
TLD: true
16+
TLD: false
17+
SITEMAP: true
1718
FAIL_ERRORS_COUNT: 15
1819
LIST: true
19-
FIX: true
20+
FIX: false
2021
UPGRADE: false
2122
COMPUTER_VISION_SUBSCRIPTION_KEY: ${{ secrets.COMPUTER_VISION_SUBSCRIPTION_KEY }}
2223
COMPUTER_VISION_ENDPOINT: ${{ secrets.COMPUTER_VISION_SUBSCRIPTION_KEY }}
@@ -32,6 +33,7 @@ All inputs are **optional** except $WEBSITE_URL.
3233
| `SITE_WIDE` | Site-wide scanning across all pages. | false |
3334
| `FIX` | Attempt to apply recommendations to code and commit to github. | false |
3435
| `SUBDOMAINS` | Include all subdomains (required SITE_WIDE=true). | true |
36+
| `SITEMAP` | Extend crawl with sitemap links (required SITE_WIDE=true). | true |
3537
| `TLD` | Include all tld extensions (required SITE_WIDE=true). | true |
3638
| `LIST` | Report the results to github as a pass or fail list or detailed report. | false |
3739
| `FAIL_TOTAL_COUNT` | Determine whether to fail the CI if total issues warnings and errors exceed the counter. Takes precedence over the other FAIL inputs. | 0 |
@@ -103,8 +105,6 @@ On a larger website A11yWatch action runs over 60x-10,000x+ faster depending on
103105

104106
When `AI_DISABLED` is set to true the run for `A11yWatch` may increase.
105107

106-
Pa11y-CI could not finish the crawl as it exceeds the github action free limits at 6 hours. It handled around 1000 pages before failing at the 6 hour mark.
107-
108108
## Common Issues
109109

110110
If you experience issues on your CI you may have to toggle the `UPGRADE` input to true in order to get the latest docker images.

action.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ inputs:
2525
description: Perform a site-wide scan.
2626
required: false
2727
default: false
28+
SITEMAP:
29+
description: Extend crawl with sitemap links.
30+
required: false
31+
default: false
2832
SUBDOMAINS:
2933
description: Include all subdomains.
3034
required: false
@@ -170,12 +174,12 @@ runs:
170174
- name: A11yWatch Crawl [Local]
171175
if: ${{ inputs.EXTERNAL == 'false' && inputs.SITE_WIDE == 'true' }}
172176
shell: bash
173-
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} --save ${{ inputs.FIX == 'true' && '--fix' || '' }}
177+
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} ${{ inputs.SITEMAP == 'true' && '--sitemap' || '' }} --save ${{ inputs.FIX == 'true' && '--fix' || '' }}
174178

175179
- name: A11yWatch Crawl [External]
176180
if: ${{ inputs.EXTERNAL == 'true' && inputs.SITE_WIDE == 'true' }}
177181
shell: bash
178-
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} --external --save ${{ inputs.FIX == 'true' && '--fix' || '' }}
182+
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} ${{ inputs.SITEMAP == 'true' && '--sitemap' || '' }} --external --save ${{ inputs.FIX == 'true' && '--fix' || '' }}
179183

180184
- name: Scan Results Check
181185
id: a11ywatch-results-generator

0 commit comments

Comments
 (0)