Update dependency mocha to v11 (#73) #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow demonstrates the use of Siteimprove Accessibility Code Checker in a CI/CD pipeline. | |
# It is intended to fail since the tested page is purposely inaccessible. This demonstrates how the | |
# failures are shown both in the console and in the Page Report in Siteimprove Intelligence Platform. | |
# See https://alfa.siteimprove.com/code-checker | |
# Note that even if the code checker step by itself fails, the full workflow doesn't. | |
# This reduces noise, and ensure that other problems in the workflow will still be reported. | |
name: Accessibility Code Checker | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
# Run weekly, on Monday morning at 05:00 UTC. | |
# Problems are reported to the latest editor of the script, | |
# currently https://github.com/Jym77 | |
- cron: '0 5 * * 1' | |
jobs: | |
build: | |
name: Accessibility Code Checker | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v4 | |
with: | |
path: .yarn/cache | |
key: yarn-${{ hashFiles('yarn.lock') }} | |
- run: > | |
yarn config set | |
npmScopes.siteimprove.npmAuthToken | |
${{ secrets.GITHUB_TOKEN }} | |
- run: yarn install --immutable | |
- run: yarn playwright install | |
- run: yarn dedupe --check | |
- run: yarn build | |
- run: yarn code-checker:start & | |
- run: | | |
status=0 | |
yarn code-checker:test || status=$? | |
if [ ${status} -ne 0 ]; then | |
echo "Code Checker failed with exit code ${status}, as expected" | |
exit 0 | |
fi | |
exit ${status} | |
env: | |
SI_USER_EMAIL: ${{ secrets.SI_USER_EMAIL }} | |
SI_API_KEY: ${{ secrets.SI_API_KEY }} |