Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Bump cypress from 12.17.3 to 13.7.2 #2556

Bump cypress from 12.17.3 to 13.7.2

Bump cypress from 12.17.3 to 13.7.2 #2556

Workflow file for this run

---
name: pa11y tests
# yamllint disable-line rule:truthy
on:
pull_request:
workflow_dispatch:
permissions: read-all
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Building site and running pa11y-ci tests
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Install Chrome
uses: browser-actions/setup-chrome@latest
- name: Checkout source
uses: actions/checkout@v3
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install dependencies
run: npm ci
- name: Test accessibility with pa11y
run: |
npm run dev & \
timeout 120s \
sh -c 'until nc -z localhost 3000; do sleep 1; done' \
&& sleep 120 \
&& npm run test:pa11y 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: verify that pa11y successfully scanned the site
if: contains(steps.pa11y_output.outputs.content, 'ailed to run')
run: |
echo "::error::Pa11y failed to run."
exit 1
- name: Comment on pull request.
uses: thollander/actions-comment-pull-request@v2
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."
echo "Please review the comment in the pull request for details."
exit 1