-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
47 lines (41 loc) · 854 Bytes
/
.travis.yml
File metadata and controls
47 lines (41 loc) · 854 Bytes
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
node_js:
- "6"
- "8"
- "10"
- "12"
- "14"
- "15"
- "16"
- "18"
install:
- npm install
before_script: >
if [[ $(node -v) =~ ^v14\.* ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
fi
script: >
if [[ $(node -v) =~ ^v14\.* ]]; then
npm run build && npm run test:cover;
else
npm run build && npm run test:unit;
fi
after_script: >
if [[ $(node -v) =~ ^v14\.* ]]; then
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
fi
jobs:
include:
- stage: npm release
if: tag IS present
node_js: "14"
script: npm run build
deploy:
provider: npm
email: "$NPM_EMAIL"
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
tags: true