-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
48 lines (39 loc) · 1.08 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
# validate here: https://config.travis-ci.com/explore
language: node_js
os: linux
cache:
yarn: true
notifications:
email: false
node_js:
- "14"
- "12"
- "10"
# - "8" - disabled: too old for commitizen
# - '6' - disabled: [email protected] requires node >=8.3
install:
- yarn
stages:
# stages run in sequence
- 'Test' # default stage, that runs 'yarn test'
- name: 'Code-coverage'
- name: 'Deploy'
if: branch = master AND type = push
jobs:
include:
# 'Test' runs 'yarn test' default
- stage: 'Code-coverage'
name: 'Report code coverage to coveralls'
node_js: "12"
before_script: yarn test # each stage gets a fresh environment: so need to run tests again here, to have coverage file
script: yarn report-coverage
- stage: 'Deploy'
name: 'Deploy to docs and to npm'
node_js: "12"
# jobs in same stage will run in parallel:
before_script: yarn build # each stage runs in a fresh environment
script: yarn deploy-docs
script: yarn semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/