Skip to content

[pre-commit.ci] pre-commit autoupdate #873

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #873

Workflow file for this run

name: pa11y tests
on: [pull_request]
jobs:
build:
name: Building site and running pa11y-ci tests
runs-on: ubuntu-latest
steps:
- name: Checkout source.
uses: actions/checkout@v4
- name: Install jekyll site dependencies.
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Install pa11y-ci dependencies.
run: npm ci
- name: Start up jekyll server.
run: npm run start-detached
- name: Run pa11y-ci.
run: npm run pa11y-ci:sitemap 2>&1 | tee pa11y_output.txt
- name: Read pa11y_output file.
id: pa11y_output
uses: juliangruber/read-file-action@v1
with:
path: ./pa11y_output.txt
- name: Comment on pull request.
uses: thollander/actions-comment-pull-request@v2
if: github.actor != 'dependabot[bot]'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: '<details><summary>Pa11y testing results</summary>
```${{ steps.pa11y_output.outputs.content }}```
</details>'
- name: Check for pa11y failures.
if: contains(steps.pa11y_output.outputs.content, 'errno 2')
run: |
echo "::error::The site is failing accessibility tests. Please review the comment in the pull request or the pa11y-ci step in the workflow for details."
exit 1