Skip to content

Commit

Permalink
Internal: Run coverage only once (#5182)
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism authored and hzoo committed Jan 21, 2017
1 parent 3a0d159 commit d76092b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .travis.yml
Expand Up @@ -6,28 +6,31 @@ cache:
directories:
- node_modules
node_js:
- '7'
- '6'
- '5'
- '4'
- '0.12'
script:
- 'if [ -n "${LINT-}" ]; then make lint ; fi'
- 'if [ -z "${LINT-}" ]; then make test-ci ; fi'
- 'if [ -n "${FLOW-}" ]; then make flow ; fi'
- '6'
- '5'
- '4'
- '0.12'

env:
- JOB=test

script:
- '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:
on_success: change
on_failure: always
slack:
on_success: change
on_failure: always
rooms:
# Generate with
# travis encrypt "babeljs:<token>#activity" --add notifications.slack.rooms
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -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
Expand Down

0 comments on commit d76092b

Please sign in to comment.