forked from verdaccio/verdaccio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
210 lines (201 loc) Β· 4.82 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
version: 2
aliases:
- &defaults
working_directory: ~/verdaccio
- &node8_executor
docker:
- image: circleci/node:8
- &node10_browser_executor
docker:
- image: circleci/node:10-browsers
- &node10_executor
docker:
- image: circleci/node:10
- &node11_executor
docker:
- image: circleci/node:11
- &default_executor
<<: *node10_executor
- &repo_key
repo-{{ .Branch }}-{{ .Revision }}
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &base_config_key
base-config-{{ .Branch }}-{{ .Revision }}
- &yarn_cache_key
yarn-sha-{{ checksum "yarn.lock" }}
- &restore_repo
attach_workspace:
at: ~/verdaccio
- &ignore_non_dev_branches
filters:
tags:
only: /.*/
branches:
ignore:
- gh-pages
- l10n_master
- /release\/.*/
- &execute_on_release
filters:
tags:
only: /v?[0-9]+(\.[0-9]+)+([-+\.][0-9a-zA-Z]+)*/
branches:
ignore:
- /.*/
jobs:
prepare:
<<: *defaults
<<: *default_executor
steps:
- checkout
- restore_cache:
key: *base_config_key
- run:
name: 'Base environment setup'
command: |
git config --global user.email "verdacciobot@users.noreply.github.com"
git config --global user.name "Verdaccio bot for Deployments"
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
echo "machine github.com login verdacciobot password $GITHUB_TOKEN" > ~/.netrc
- save_cache:
key: *base_config_key
paths:
- ~/.npmrc
- ~/.gitconfig
- ~/.netrc
- restore_cache:
key: *yarn_cache_key
- run:
name: Install Js dependencies
command: yarn install --no-progress --registry https://registry.verdaccio.org
- run:
name: Prepare CI
command: yarn run pre:ci
- run:
name: Build project
command: yarn run code:build
- save_cache:
key: *yarn_cache_key
paths:
- ~/.yarn
- ~/.cache/yarn
- node_modules
- persist_to_workspace:
root: ~/verdaccio
paths:
- ./*
test_node8:
<<: *defaults
<<: *node8_executor
steps:
- *restore_repo
- run:
name: Test with Node 8
command: |
yarn test
yarn test:functional
test_node10:
<<: *defaults
<<: *node10_executor
steps:
- *restore_repo
- run:
name: Test with Node 10
command: |
yarn run test
yarn test:functional
test_node11:
<<: *defaults
<<: *node11_executor
steps:
- *restore_repo
- run:
name: Test with Node 11
command: |
yarn run test
yarn test:functional
test_e2e:
<<: *defaults
<<: *node10_browser_executor
steps:
- *restore_repo
- run:
name: Test End-to-End
command: yarn run test:e2e
test_size:
<<: *defaults
<<: *default_executor
steps:
- *restore_repo
- restore_cache:
key: *base_config_key
- run:
name: Test size
command: yarn test:size
coverage:
<<: *defaults
<<: *default_executor
steps:
- *restore_repo
- restore_cache:
key: *coverage_key
- run:
name: Publish coverage
command: yarn run coverage:publish
- store_artifacts:
path: coverage/clover.xml
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: coverage/clover.xml
publish_package:
<<: *defaults
<<: *default_executor
steps:
- *restore_repo
- restore_cache:
key: *base_config_key
- run:
name: Publish
command: scripts/publish.sh
workflows:
version: 2
workflow:
jobs:
- prepare:
<<: *ignore_non_dev_branches
- test_node8:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node10:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node11:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_e2e:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_size:
requires:
- prepare
<<: *ignore_non_dev_branches
- coverage:
requires:
- test_node8
- test_node10
- test_node11
- test_e2e
- test_size
<<: *ignore_non_dev_branches
- publish_package:
requires:
- coverage
<<: *execute_on_release