This commit is contained in:
Ward Peeters 2016-07-25 23:07:53 +02:00 коммит произвёл Paul Irish
Родитель eaede963c7
Коммит da09ffb29a
4 изменённых файлов: 8 добавлений и 19 удалений

Просмотреть файл

@ -2,14 +2,8 @@ language: node_js
matrix:
include:
- node_js: "4.3.2"
env:
- UNIT=unit:harmony COVERALLS=coveralls:harmony
- node_js: "5.0"
env:
- UNIT=unit COVERALLS=coveralls
- node_js: "node"
env:
- UNIT=unit COVERALLS=coveralls
sudo: required
dist: trusty
cache:
@ -25,10 +19,11 @@ before_script:
- start-stop-daemon --start --background --exec $(pwd)/lighthouse-core/scripts/launch-chrome.sh
- sleep 5
script:
- if [[ $(node -v) =~ ^v4.* ]]; then export __node_harmony=--harmony; fi
- npm run lint
- npm run $UNIT
- npm run unit
- npm run closure
- npm run $COVERALLS
- npm run coveralls
- npm run smoke
- cd lighthouse-extension
- gulp build

1
lighthouse-core/.npmrc Normal file
Просмотреть файл

@ -0,0 +1 @@
harmony = ""

Просмотреть файл

@ -11,8 +11,7 @@
"lint": "eslint --ignore-path ../.eslintignore .",
"test": "npm run lint --silent && npm run unit && npm run closure",
"watch": "find . -name '*.js' -not -path '*/node_modules/*' -not -path '*/extension/*' | entr npm run unit",
"unit": "mocha $(find ./test -name '*.js') --timeout 60000",
"unit:harmony": "mocha --harmony $(find ./test -name '*.js') --timeout 60000",
"unit": "mocha $(echo $__node_harmony) $(find ./test -name '*.js') --timeout 60000",
"chrome": "./scripts/launch-chrome.sh"
},
"repository": "googlechrome/lighthouse",

Просмотреть файл

@ -12,18 +12,12 @@
"postinstall": "node _install_deps.js",
"lint": "eslint .",
"smoke": "lighthouse-cli/scripts/run-smoke-tests.sh",
"coverage": "istanbul cover -x \"**/third_party/**\" _mocha -- $(find */test -name '*.js') --timeout 60000",
"coverage:harmony": "node --harmony node_modules/istanbul/lib/cli.js cover -x \"**/third_party/**\" _mocha -- $(find */test -name '*.js') --timeout 60000",
"coverage": "node $(echo $__node_harmony) $(npm bin)/istanbul cover -x \"**/third_party/**\" _mocha -- $(find */test -name '*.js') --timeout 60000",
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls",
"coveralls:harmony": "npm run coverage:harmony && cat ./coverage/lcov.info | coveralls",
"start": "node ./lighthouse-cli/index.js",
"test": "if [[ $(node -v) =~ ^v4.* ]]; then npm run test:harmony; else npm run test:sans-harmony; fi",
"test:sans-harmony": "npm run lint --silent && npm run unit && npm run closure",
"test:harmony": "npm run lint --silent && npm run unit:harmony && npm run closure",
"cli-unit": "mocha $(find lighthouse-cli/test -name '*.js') --timeout 60000",
"cli-unit:harmony": "mocha --harmony $(find lighthouse-cli/test -name '*.js') --timeout 60000",
"test": "npm run lint --silent && npm run unit && npm run closure",
"cli-unit": "mocha $(echo $__node_harmony) $(find lighthouse-cli/test -name '*.js') --timeout 60000",
"unit": "npm run cli-unit && npm --prefix ./lighthouse-core run unit",
"unit:harmony": "npm run cli-unit:harmony && npm --prefix ./lighthouse-core run unit:harmony",
"//":
"// passing through tasks to core",
"closure": "npm --prefix ./lighthouse-core run closure",