1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00
slate/.travis.yml
Jinxuan Zhu 58c644323f Add coverage test with mocha and codecov (#2037)
* Run mocha test with module alias

* Running test with babel module alias

* Fix model alias

* Fix model alias

* Resolve module alias

* Running test with babel module alias

* Connect to codecov

* add codecov to travis

* stop if yarn test has errors

* Still cannot collect data from slate modules

* Try to check whether it works with codecov

* Move config to nycrc

* Remove nyc require

* Update nyc to use src

* better before_script
2018-08-06 10:31:42 -07:00

33 lines
639 B
YAML

language: node_js
node_js: [node]
before_install:
# Export the C++11 compiler.
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
cache: yarn
env:
# Do two runs, one for testing and one for linting.
matrix:
- TEST_TYPE=test:coverage
- 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
script:
# Run testing or linting depending on the environment.
- |
set -e
yarn $TEST_TYPE
if [[ $TEST_TYPE == 'test:coverage' ]]; then yarn codecov; fi
set +e