Skip to content

Commit

Permalink
feat(sitemap): add sitemap crawl option (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Jan 23, 2023
1 parent c4f2d1f commit b6c4b69
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 57 deletions.
1 change: 1 addition & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
FAIL_TOTAL_COUNT: 10000
EXTERNAL: false
SITE_WIDE: true
SITEMAP: true
SUBDOMAINS: true
TLD: true
LIST: true
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/bench-axe.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/bench-pa11y.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ Some of the primary features include pass/fail testing, code fixes, and detailed
### Usage

```yaml
- uses: a11ywatch/github-action@v1.12.3
- uses: a11ywatch/github-action@v1.13.0
with:
WEBSITE_URL: ${{ secrets.WEBSITE_URL }}
SUBDOMAINS: true
TLD: true
TLD: false
SITEMAP: true
FAIL_ERRORS_COUNT: 15
LIST: true
FIX: true
FIX: false
UPGRADE: false
COMPUTER_VISION_SUBSCRIPTION_KEY: ${{ secrets.COMPUTER_VISION_SUBSCRIPTION_KEY }}
COMPUTER_VISION_ENDPOINT: ${{ secrets.COMPUTER_VISION_SUBSCRIPTION_KEY }}
Expand All @@ -32,6 +33,7 @@ All inputs are **optional** except $WEBSITE_URL.
| `SITE_WIDE` | Site-wide scanning across all pages. | false |
| `FIX` | Attempt to apply recommendations to code and commit to github. | false |
| `SUBDOMAINS` | Include all subdomains (required SITE_WIDE=true). | true |
| `SITEMAP` | Extend crawl with sitemap links (required SITE_WIDE=true). | true |
| `TLD` | Include all tld extensions (required SITE_WIDE=true). | true |
| `LIST` | Report the results to github as a pass or fail list or detailed report. | false |
| `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 |
Expand Down Expand Up @@ -103,8 +105,6 @@ On a larger website A11yWatch action runs over 60x-10,000x+ faster depending on

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

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.

## Common Issues

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.
Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: Perform a site-wide scan.
required: false
default: false
SITEMAP:
description: Extend crawl with sitemap links.
required: false
default: false
SUBDOMAINS:
description: Include all subdomains.
required: false
Expand Down Expand Up @@ -170,12 +174,12 @@ runs:
- name: A11yWatch Crawl [Local]
if: ${{ inputs.EXTERNAL == 'false' && inputs.SITE_WIDE == 'true' }}
shell: bash
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} --save ${{ inputs.FIX == 'true' && '--fix' || '' }}
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} ${{ inputs.SITEMAP == 'true' && '--sitemap' || '' }} --save ${{ inputs.FIX == 'true' && '--fix' || '' }}

- name: A11yWatch Crawl [External]
if: ${{ inputs.EXTERNAL == 'true' && inputs.SITE_WIDE == 'true' }}
shell: bash
run: a11ywatch crawl --url ${{ inputs.WEBSITE_URL }} ${{ inputs.SUBDOMAINS == 'true' && '--subdomains' || '' }} ${{ inputs.TLD == 'true' && '--tld' || ''}} --external --save ${{ inputs.FIX == 'true' && '--fix' || '' }}
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' || '' }}

- name: Scan Results Check
id: a11ywatch-results-generator
Expand Down

0 comments on commit b6c4b69

Please sign in to comment.