2016-06-15 12:07:12 -07:00
|
|
|
language: node_js
|
2017-09-11 18:11:45 -07:00
|
|
|
node_js: [node]
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
# Export the C++11 compiler.
|
|
|
|
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
|
|
|
|
|
2018-08-06 13:31:42 -04:00
|
|
|
cache: yarn
|
2017-09-11 18:11:45 -07:00
|
|
|
|
2016-11-01 15:20:04 +01:00
|
|
|
env:
|
2017-09-11 18:11:45 -07:00
|
|
|
# Do two runs, one for testing and one for linting.
|
2016-11-01 15:20:04 +01:00
|
|
|
matrix:
|
2018-09-19 14:39:02 -04:00
|
|
|
- TEST_TYPE=test:coverage
|
2018-08-06 13:31:42 -04:00
|
|
|
- TEST_TYPE=lint:eslint
|
|
|
|
- TEST_TYPE=lint:prettier
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- |
|
|
|
|
set -e
|
|
|
|
if [[ $TEST_TYPE == 'lint:eslint' ]]; then
|
|
|
|
lerna bootstrap
|
|
|
|
yarn build
|
|
|
|
fi
|
|
|
|
set +e
|
2017-09-11 18:11:45 -07:00
|
|
|
|
2016-11-01 15:02:07 +01:00
|
|
|
script:
|
2017-09-11 18:11:45 -07:00
|
|
|
# Run testing or linting depending on the environment.
|
2018-08-06 13:31:42 -04:00
|
|
|
- |
|
|
|
|
set -e
|
|
|
|
yarn $TEST_TYPE
|
2018-09-19 14:39:02 -04:00
|
|
|
if [[ $TEST_TYPE == 'test:coverage' ]]; then yarn codecov; fi
|
2018-08-06 13:31:42 -04:00
|
|
|
set +e
|