diff --git a/.travis.yml b/.travis.yml index 60d0fd778c71..1f8f16bb4ea1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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:#activity" --add notifications.slack.rooms diff --git a/Makefile b/Makefile index 9dc300ba6c64..823878ed175a 100644 --- a/Makefile +++ b/Makefile @@ -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