Internal: Run coverage only once (#5182)

This commit is contained in:
Brian Ng 2017-01-21 07:20:03 -06:00 committed by Henry Zhu
parent 3a0d1599cd
commit d76092b2dd
2 changed files with 22 additions and 15 deletions

View File

@ -6,28 +6,31 @@ cache:
directories:
- node_modules
node_js:
- '7'
- '6'
- '5'
- '4'
- '0.12'
- '6'
- '5'
- '4'
- '0.12'
env:
- JOB=test
script:
- 'if [ -n "${LINT-}" ]; then make lint ; fi'
- 'if [ -z "${LINT-}" ]; then make test-ci ; fi'
- 'if [ -n "${FLOW-}" ]; then make flow ; fi'
- 'if [ "$JOB" = "test" ]; then make test-ci; fi'
- 'if [ "$JOB" = "test-coverage" ]; then make test-ci-coverage; fi'
- 'if [ "$JOB" = "lint" ]; then make lint && make flow; fi'
matrix:
fast_finish: true
include:
- node_js: "7"
env: JOB=test-coverage
- node_js: "node"
env:
- LINT: true
- FLOW: true
env: JOB=lint
notifications:
slack:
on_success: change
on_failure: always
slack:
rooms:
# Generate with
# travis encrypt "babeljs:<token>#activity" --add notifications.slack.rooms

View File

@ -49,6 +49,10 @@ test-only:
test: lint test-only
test-ci:
NODE_ENV=test make bootstrap
make test-only
test-ci-coverage:
NODE_ENV=test BABEL_ENV=cov make bootstrap
./scripts/test-cov.sh
./node_modules/.bin/codecov -f coverage/coverage-final.json