Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run pa11y on the homepage and kitchen sink
- Loading branch information
1 parent
bacb5b1
commit 8e04633
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
zola serve & | ||
ZOLA="$!" | ||
trap 'kill $ZOLA' EXIT | ||
|
||
while true; do | ||
if lsof -i :1111 | grep -q zola; then | ||
break | ||
fi | ||
sleep 1 | ||
done | ||
|
||
EXIT=0 | ||
|
||
for url in localhost:1111 localhost:1111/kitchen-sink; do | ||
if ! pa11y -E pre --runner axe "$url"; then | ||
EXIT=1 | ||
fi | ||
done | ||
|
||
exit "$EXIT" |