diff --git a/.travis.yml b/.travis.yml index 00de3b3e..1dc355fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,12 @@ +sudo: required +dist: xenial language: node_js +node_js: + - '10' +addons: + chrome: stable cache: npm -script: npm run build +script: + - npm run build + - ./run_lighthouse.sh after_success: npm run sizereport diff --git a/run_lighthouse.sh b/run_lighthouse.sh new file mode 100755 index 00000000..297e2b23 --- /dev/null +++ b/run_lighthouse.sh @@ -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 \ No newline at end of file