mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 10:39:53 +00:00
Add Lighthouse CI script
This commit is contained in:
10
.travis.yml
10
.travis.yml
@@ -1,4 +1,12 @@
|
|||||||
|
sudo: required
|
||||||
|
dist: xenial
|
||||||
language: node_js
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- '10'
|
||||||
|
addons:
|
||||||
|
chrome: stable
|
||||||
cache: npm
|
cache: npm
|
||||||
script: npm run build
|
script:
|
||||||
|
- npm run build
|
||||||
|
- ./run_lighthouse.sh
|
||||||
after_success: npm run sizereport
|
after_success: npm run sizereport
|
||||||
|
|||||||
13
run_lighthouse.sh
Executable file
13
run_lighthouse.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
npx http-server -p 9000 ./dist &
|
||||||
|
|
||||||
|
npm install -g @lhci/cli@next
|
||||||
|
|
||||||
|
lhci collect --url=http://localhost:9000/
|
||||||
|
|
||||||
|
lhci assert --preset="lighthouse:recommended"
|
||||||
|
|
||||||
|
EXIT_CODE=$?
|
||||||
|
kill $!
|
||||||
|
exit $EXIT_CODE
|
||||||
Reference in New Issue
Block a user