jrnl/.github/workflows/pa11y.sh
Jonathan Wren 4d97110183
Add initial config for Github Actions (#1078)
* Add initial config to test github actions

* remove other CI configs so PR doesn't get bogged down

* add poetry

* skip failing test, update behave output

* add multiple python versions

* add test cache

* try to use matrix for python version

* try to cache pip installation

* add other OSes

* whitespace changes

* skip failing test on windows

* add pip cache

* take out pip cache

* clean up, add linting steps

* add release branch to testing

* clean up

* add initial a11y config for docs site

* take out junit for now

* add junit annotations

* try different junit reporter

* add junit annotations into same workflow

* linter fix

* make junit step always run

* more junit

* clean up

* disable a11y exit code for now (always pass)

* put back travis and circle so we can temporarily run everything in tandem

* fix for issues with secret tokens
2020-11-14 12:42:36 -08:00

20 lines
583 B
Bash
Executable file

#! /bin/bash
set +e
reports_dir="reports/pa11y"
site_url="http://127.0.0.1:8000"
exit_code=0
mkdocs build
mkdir -p "$reports_dir"
printf -- 'scanning: /\n'
./node_modules/.bin/pa11y "$site_url" --reporter junit > "$reports_dir/root.xml" || exit_code=2
for file in $(xq '.urlset.url[].loc' site/sitemap.xml -r | sed -r 's!https://jrnl.sh/(.*?)/$!\1!'); do
printf -- 'scanning: /%s\n' "$file"
./node_modules/.bin/pa11y "$site_url/$file" --reporter junit > "$reports_dir/$file.xml" || exit_code=2
done
# exit $exit_code
exit 0 # ignore for now since there are so many warnings