Chore: FLOW command in makefile and logic in .travis.yml(issue#4710). (#4807)

This commit is contained in:
Scott Stern 2016-11-04 05:26:45 -07:00 committed by Henry Zhu
parent b68e9bfba7
commit 723ca0eef8
2 changed files with 7 additions and 2 deletions

View File

@ -13,12 +13,15 @@ node_js:
script: script:
- 'if [ -n "${LINT-}" ]; then make lint ; fi' - 'if [ -n "${LINT-}" ]; then make lint ; fi'
- 'if [ -z "${LINT-}" ]; then make test-ci ; fi' - 'if [ -z "${LINT-}" ]; then make test-ci ; fi'
- 'if [ -n "${FLOW-}" ]; then make flow ; fi'
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
- node_js: "node" - node_js: "node"
env: LINT=true env:
- LINT: true
- FLOW: true
notifications: notifications:
on_success: change on_success: change

View File

@ -20,6 +20,9 @@ watch: clean
lint: lint:
./node_modules/.bin/eslint packages/*/{src,test}/*.js --format=codeframe ./node_modules/.bin/eslint packages/*/{src,test}/*.js --format=codeframe
flow:
./node_modules/.bin/flow check
fix: fix:
./node_modules/.bin/eslint packages/*/{src,test}/*.js --format=codeframe --fix ./node_modules/.bin/eslint packages/*/{src,test}/*.js --format=codeframe --fix
@ -54,7 +57,6 @@ test-cov: clean
test-ci: test-ci:
NODE_ENV=test make bootstrap NODE_ENV=test make bootstrap
# if ./node_modules/.bin/semver `npm --version` -r ">=3.3.0"; then ./node_modules/.bin/flow check; fi
./scripts/test-cov.sh ./scripts/test-cov.sh
cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js