Skip to content

Commit

Permalink
run pa11y on the homepage and kitchen sink
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Nov 28, 2020
1 parent bacb5b1 commit 8e04633
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions script/run-pa11y.sh
@@ -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"

0 comments on commit 8e04633

Please sign in to comment.