forked from kulshekhar/ts-jest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (40 loc) · 1.59 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
language: node_js
env:
- TS_JEST_E2E_WORKDIR=/tmp/ts-jest-e2e-workdir TS_JEST_E2E_OPTIMIZATIONS=1
cache:
npm: true
directories:
- .cache
- /tmp/ts-jest-e2e-workdir/__templates__
node_js:
- "10"
- "6"
sudo: false
before_install:
# Disabled, randomly works :-/
# https://github.com/scikit-learn/scikit-learn/issues/10927
# - |
# set -e
# # fail loudly when force-pushed, that is why there is the `|| 'dummy.js'` part
# MODIFIED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE || echo 'dummy.js')
# # waiting for native solution https://github.com/travis-ci/travis-ci/issues/6301
# if ! echo ${MODIFIED_FILES} | grep -qvE '^docs/|^\.gitignore|^\.gitattributes|\.md$|^appveyor\.yml$|^icon\.png$|^commitlint\.config\.js$'; then
# echo "Only docs were updated, stopping build process."
# exit
# fi
# ensure we have npm >= 5.8 so that we can use `npm ci` instead of `npm install` (much faster)
- dpkg --compare-versions `npm -v` ge 5.8 || npm i -g npm@latest
# we report coverages only within node 10, ensure we have the coveralls bin installed
- 'if [[ "$(node --version)" == v10.* ]]; then npm install --global coveralls; fi'
script:
- npm run clean -- --when-ci-commit-message
# only grab coverage data on node 10
- |
if [[ "$(node --version)" == v10.* ]]; then
npm run test -- --runInBand --coverage;
else
npm run test -- --runInBand;
fi
after_success:
# report coverages to coveralls
- 'if [[ "$(node --version)" == v10.* && -s coverage/lcov.info ]]; then cat coverage/lcov.info | coveralls; fi'