2019-12-24 12:54:32 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-12-26 12:10:23 +01:00
|
|
|
set -x
|
|
|
|
|
2019-12-24 12:54:32 +01:00
|
|
|
envtpl -o config.js /home/lighthouse/config.js.tmpl
|
2019-12-26 12:10:23 +01:00
|
|
|
envtpl -o patty.json /home/lighthouse/patty.json.tmpl
|
2019-12-24 12:54:32 +01:00
|
|
|
|
|
|
|
mkdir -p reports
|
|
|
|
rm -f reports/*
|
|
|
|
|
|
|
|
cd reports
|
|
|
|
|
|
|
|
lighthouse \
|
|
|
|
--no-enable-error-reporting \
|
|
|
|
--chrome-flags="--headless --disable-dev-shm-usage --no-sandbox --disable-gpu" \
|
|
|
|
--config=../config.js \
|
|
|
|
--output json --output html \
|
|
|
|
--output-path=lighthouse \
|
|
|
|
-- \
|
2019-12-26 12:10:23 +01:00
|
|
|
"$LIGHTHOUSE_URL"
|
|
|
|
|
|
|
|
export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)
|
|
|
|
|
|
|
|
pa11y --reporter html \
|
|
|
|
--config ../patty.json \
|
|
|
|
--include-warnings \
|
|
|
|
--include-notices \
|
|
|
|
"$LIGHTHOUSE_URL" > pa11y.report.html || exit 0
|