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

Commit

Permalink
simplify accessibility action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCDL committed Apr 21, 2022
1 parent 1d90dee commit 8d85506
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Accessibility
on: push
jobs:
test:
name: Test
name: Accessibility Audit
runs-on: ubuntu-latest
steps:
- name: Check out repository code
Expand All @@ -17,16 +17,5 @@ jobs:
npm config set '@fortawesome:registry=https://npm.fontawesome.com/'
npm config set '//npm.fontawesome.com/:_authToken' "${{ secrets.FONTAWESOME_TOKEN }}"
npm ci
- name: Run pa11y-ci tests
- name: Run pa11y-ci test
run: npm run test-a11y
- name: Read pa11y-ci test results
id: pa11yci_results
uses: juliangruber/read-file-action@v1
with:
path: pa11yci/pa11yci-results.txt
- name: Report pa11y-ci errors
if: contains(steps.pa11yci_results.outputs.content, 'Errors in')
run: |
echo "::error::Accessibility errors were found."
echo "${{ steps.pa11yci_results.outputs.content }}"
exit 1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lintstyles": "stylelint 'styles/*'",
"github-pages": "gh-pages -d dist",
"pa11y": "pa11y --runner axe --runner htmlcs",
"pa11yci": "pa11y-ci --config pa11yci/pa11yci.config.json 2>&1 | tee pa11yci/pa11yci-results.txt",
"pa11yci": "pa11y-ci --config pa11yci/pa11yci.config.json",
"test-a11y": "start-server-and-test serve 1234 pa11yci"
},
"repository": {
Expand Down

0 comments on commit 8d85506

Please sign in to comment.