Update tests #10
This file contains hidden or 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
name: Tests declaration-a11y action | |
on: | |
push: | |
branches: ["*"] | |
paths: | |
- declaration-a11y/** | |
- .github/workflows/declaration-a11y.yml | |
pull_request: | |
branches: ["*"] | |
paths: | |
- declaration-a11y/** | |
- .github/workflows/declaration-a11y.yml | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
name: Test declaration-a11y | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/*" | |
- name: Install | |
shell: bash | |
run: | | |
cd declaration-a11y | |
yarn | |
- shell: bash | |
run: | | |
cd declaration-a11y | |
yarn test | |
tests-declaration-a11y: | |
runs-on: ubuntu-latest | |
name: declaration-a11y action | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- shell: bash | |
run: | | |
ls -la | |
- uses: ./declaration-a11y | |
with: | |
url: https://labonnealternance.apprentissage.beta.gouv.fr | |
output: a11y.json | |
- shell: bash | |
run: | | |
ls -la | |
cat a11y.json | |
[[ $(cat a11y.json | jq -rc '.mention') == "Accessibilité : partiellement conforme" ]] || (echo "Error: Should mention Accessibilité : partiellement conforme" && exit 1) |