config.yml
1.37 KB
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
step-restore-cache: &step-restore-cache
restore_cache:
keys:
- v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- v1-dependencies-{{ arch }}
steps-test: &steps-test
steps:
- checkout
- *step-restore-cache
- run: yarn --frozen-lockfile
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- run: yarn test
version: 2.1
jobs:
test-linux-10:
docker:
- image: circleci/node:10
<<: *steps-test
test-linux-12:
docker:
- image: circleci/node:12
<<: *steps-test
test-linux-14:
docker:
- image: circleci/node:14
<<: *steps-test
test-linux-16:
docker:
- image: circleci/node:16
<<: *steps-test
release:
docker:
- image: circleci/node:14.15
steps:
- checkout
- *step-restore-cache
- run: yarn --frozen-lockfile
- run: npx semantic-release@17.4.5
workflows:
version: 2
test_and_release:
# Run test jobs first, release only when all the test jobs are successful
jobs:
- test-linux-10
- test-linux-12
- test-linux-14
- test-linux-16
- release:
requires:
- test-linux-10
- test-linux-12
- test-linux-14
- test-linux-16
filters:
branches:
only:
- main