forked from qiwi/multi-semantic-release
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisabled.travis.yml
74 lines (66 loc) · 1.81 KB
/
disabled.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
language: node_js
node_js: 16
install: skip
cache: yarn
os: linux
dist: focal
jobs:
fast_finish: true
include:
- stage: verify
if: branch != master AND type != pull_request
install:
- yarn
script:
- yarn build
- if [ "$CI_TEST" != "false" ]; then
yarn lint;
fi
- &build
if: branch = master
stage: build
install:
- yarn
script:
- yarn build
# https://docs.travis-ci.com/user/using-workspaces/
workspaces:
create:
name: linux-shared
paths:
- node_modules
- packages
- &test
if: branch = master AND type = pull_request AND env(CI_TEST) != false
stage: test
script: yarn test
workspaces:
use: linux-shared
- <<: *test
node_js: 12
- <<: *test
node_js: 14
- <<: *test
if: branch = master AND type != pull_request AND env(CI_TEST) != false
before_script:
- if [ "$CC_TEST_REPORTER_ID" != "" ]; 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 [ "$CC_TEST_REPORTER_ID" != "" ]; then
yarn test:report;
else
yarn test;
fi
after_script:
- if [ "$CC_TEST_REPORTER_ID" != "" ]; then
./cc-test-reporter format-coverage -t lcov ./coverage/lcov.info;
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
fi
- stage: release
if: branch = master AND type != pull_request AND env(CI_RELEASE) = true
workspaces:
use: linux-shared
script: yarn run semantic-release