/
.travis.yml
52 lines (51 loc) 路 1.43 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
48
49
50
51
52
branches:
only:
- master
- /v\d.+/
language: node_js
os:
- windows
- linux
node_js:
- 12
- 11
- 10
- 8
env:
- FRESH_DEPS=false
- FRESH_DEPS=true
matrix:
exclude:
- node_js: 12
env: FRESH_DEPS=true # Assume any bugs that occur with fresh dependencies are not platform specific.
os: windows
- node_js: 12
env: FRESH_DEPS=false
os: linux # Windows already tests without fresh dependencies, and we test *with* on Linux.
- node_js: 11
os: windows # We don't need to test odd-version releases very hard.
- node_js: 11
env: FRESH_DEPS=true
- node_js: 10
env: FRESH_DEPS=true
- node_js: 8
env: FRESH_DEPS=true
cache: npm
before_install: if [[ "$(npm -v)" != "6.9.0" ]] && [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then npm install --global npm@6.9.0; fi
install: npm ci
before_script: |
if [[ ${FRESH_DEPS} == "true" ]]; then
npm install --no-shrinkwrap --prefer-online
elif [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
checksum=$(md5sum package-lock.json)
npm install --package-lock-only
if ! echo ${checksum} | md5sum --quiet -c -; then
echo "package-lock.json was modified unexpectedly. Please rebuild it using npm@$(npm -v) and commit the changes."
exit 1
fi
fi
if [[ "${TRAVIS_OS_NAME}" == "windows" ]]; then
git config core.symlinks true
git reset --hard
fi
after_success: npx codecov --file=./coverage/lcov.info