2016-03-03 15:52:12 +08:00
|
|
|
sudo: false
|
|
|
|
|
2015-06-08 20:12:49 +08:00
|
|
|
language: node_js
|
|
|
|
|
|
|
|
node_js:
|
2016-10-25 14:45:23 +08:00
|
|
|
- "6"
|
2016-11-22 13:43:53 +08:00
|
|
|
|
2017-01-08 17:04:09 +08:00
|
|
|
env:
|
2017-03-09 20:58:07 +08:00
|
|
|
matrix:
|
|
|
|
- TEST_TYPE=lint
|
|
|
|
- TEST_TYPE=dist
|
|
|
|
- TEST_TYPE=compile
|
|
|
|
- TEST_TYPE=test:dom
|
|
|
|
- TEST_TYPE=test:node
|
2017-01-08 17:04:09 +08:00
|
|
|
|
|
|
|
script:
|
2017-03-09 20:58:07 +08:00
|
|
|
- |
|
|
|
|
if [ "$TEST_TYPE" = lint ]; then
|
|
|
|
npm run lint
|
|
|
|
elif [ "$TEST_TYPE" = dist ]; then
|
|
|
|
npm run dist && \
|
2017-07-03 18:01:31 +08:00
|
|
|
node ./tests/dekko/dist.test.js && \
|
2017-06-30 15:29:28 +08:00
|
|
|
LIB_DIR=dist npm test -- --coverage -w 2
|
2017-03-09 20:58:07 +08:00
|
|
|
elif [ "$TEST_TYPE" = compile ]; then
|
2017-07-03 18:59:05 +08:00
|
|
|
npm run dist && \
|
2017-03-09 20:58:07 +08:00
|
|
|
npm run compile && \
|
2017-07-03 18:01:31 +08:00
|
|
|
node ./tests/dekko/lib.test.js && \
|
|
|
|
LIB_DIR=es npm test -- --coverage -w 2 && \
|
2017-06-30 15:29:28 +08:00
|
|
|
LIB_DIR=lib npm test -- --coverage -w 2
|
2017-03-13 12:52:22 +08:00
|
|
|
elif [ "$TEST_TYPE" = test:dom ]; then
|
2017-03-09 20:58:07 +08:00
|
|
|
npm run dist && \
|
|
|
|
npm test -- --coverage -w 2 && \
|
|
|
|
bash <(curl -s https://codecov.io/bash)
|
2017-03-13 12:52:22 +08:00
|
|
|
elif [ "$TEST_TYPE" = test:node ]; then
|
2017-06-30 15:29:28 +08:00
|
|
|
npm run test-node -- -w 2
|
2017-03-09 20:58:07 +08:00
|
|
|
fi
|