-
-
Notifications
You must be signed in to change notification settings - Fork 557
/
config.yml
118 lines (114 loc) 路 2.74 KB
/
config.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: 2
aliases:
- &checkout_master
name: checkout master
command: |
if [[ $(git rev-parse --abbrev-ref HEAD) != "master" ]]; then
git branch -f master origin/master;
fi
- &install_pnpm
name: Install pnpm
command: npm install pnpm@^4.0.0 -g
- &install_yarn
name: Install yarn
command: npm install yarn -g
- &pnpm_install
name: Install Dependencies
command: pnpm install --ignore-scripts
- &restore_cache
key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
coverage: &coverage
steps:
- checkout
- run: *checkout_master
- restore_cache: *restore_cache
- run: *install_pnpm
- run: *install_yarn
- run: *pnpm_install
- run:
name: Run unit tests.
command: pnpm run ci:coverage
- run:
name: Submit coverage data to codecov.
command: pnpm run ci:coverage:submit
when: on_success
unit_tests: &unit_tests
steps:
- checkout
- run: *checkout_master
- restore_cache: *restore_cache
- run: *install_pnpm
- run: *install_yarn
- run: *pnpm_install
- run:
name: Env Info
command: |
node --version
npm --version
pnpm --version
- run:
name: Run unit tests.
command: |
pnpm run ci:test
echo "prev return code: $?"
jobs:
analysis:
docker:
- image: rollupcabal/circleci-node-base:latest
steps:
- checkout
- run: *checkout_master
- run: *install_pnpm
- restore_cache: *restore_cache
- run: *pnpm_install
- run:
name: Run Security Checks
command: pnpm run security
- run:
name: Run linting.
command: pnpm run ci:lint
- run:
name: Check TypeScript types.
command: pnpm run test:ts
- save_cache:
key: dependency-cache-{{ checksum "pnpm-lock.yaml" }}
paths:
- ./node_modules
node-v10-latest:
docker:
- image: rollupcabal/circleci-node-v10:latest
<<: *unit_tests
node-v12-latest:
docker:
- image: rollupcabal/circleci-node-v12:latest
<<: *coverage
node-v14-latest:
docker:
- image: rollupcabal/circleci-node-v14:latest
<<: *coverage
workflows:
version: 2
validate-test:
jobs:
- analysis:
filters:
tags:
only: /.*/
- node-v10-latest:
requires:
- analysis
filters:
tags:
only: /.*/
- node-v12-latest:
requires:
- analysis
filters:
tags:
only: /.*/
- node-v14-latest:
requires:
- analysis
filters:
tags:
only: /.*/