1
+ defaultCypressOrbConfig : &defaultCypressOrbConfig
2
+ executor : cypress/default
3
+
1
4
# https://circleci.com/docs/2.0/configuration-reference/
2
5
version : 2.1
3
6
orbs :
4
7
# https://github.com/cypress-io/circleci-orb
5
- cypress : cypress-io/cypress@1.29 .0 # used to run e2e tests
8
+ cypress : cypress-io/cypress@3.0 .0 # used to run e2e tests
6
9
win : circleci/windows@2 # run a test job on Windows
7
10
8
11
jobs :
9
12
lint :
10
13
description : Checks the code formatting
11
14
docker :
12
- - image : cimg/node:16.9.1
15
+ - image : cimg/node:16.16.0
13
16
environment :
14
17
# we don't need Cypress to check code styl
15
18
CYPRESS_INSTALL_BINARY : ' 0'
@@ -20,11 +23,76 @@ jobs:
20
23
name : Code style check 🧹
21
24
command : npm run format:check
22
25
- run : npm run check:markdown
26
+
27
+ install_and_persist :
28
+ << : *defaultCypressOrbConfig
29
+ steps :
30
+ - cypress/install
31
+ - run :
32
+ name : Install deps for test-apps/old-cypress-config
33
+ command : npm ci
34
+ working_directory : test-apps/old-cypress-config
35
+ - run :
36
+ name : Install deps for test-apps/new-cypress-config
37
+ command : npm ci
38
+ working_directory : test-apps/new-cypress-config
39
+ - run : npm run check:markdown
40
+ - persist_to_workspace :
41
+ paths :
42
+ - .cache/Cypress
43
+ - project
44
+ root : ~/
45
+ # windows_test:
46
+ # executor:
47
+ # # executor comes from the "windows" orb
48
+ # name: win/default
49
+ # shell: bash.exe
50
+ # steps:
51
+ # - cypress/run:
52
+ # # no-workspace: true
53
+ # start-command: npm run start:windows --prefix test-apps/old-cypress-config/all-files
54
+ # # wait-on: 'http://localhost:1234'
55
+ # cypress-command: npx cypress run --project test-apps/old-cypress-config/all-files
56
+ # # store screenshots and videos
57
+ # # store_artifacts: true
58
+ # post-checkout:
59
+ # - run:
60
+ # name: Install node 16
61
+ # command: nvm install 16.16.0
62
+ # - run:
63
+ # name: Use node 16
64
+ # command: nvm use 16.16.0
65
+ # - run:
66
+ # name: Install deps for code coverage
67
+ # command: npm ci
68
+ # post-install:
69
+ # - run:
70
+ # name: Install deps for test-apps/old-cypress-config
71
+ # command: npm ci
72
+ # working_directory: test-apps/old-cypress-config
73
+ # post-steps:
74
+ # # store the created coverage report folder
75
+ # # you can click on it in the CircleCI UI
76
+ # # to see live static HTML site
77
+ # - store_artifacts:
78
+ # path: test-apps/old-cypress-config/all-files/coverage
79
+ # # make sure the examples captures 100% of code
80
+ # - run:
81
+ # name: Verify Code Coverage
82
+ # command: npm run coverage:verify
83
+ # working_directory: test-apps/old-cypress-config/all-files
84
+ # - run:
85
+ # name: Check code coverage files 📈
86
+ # # we will check the final coverage report
87
+ # # to make sure it only has files we are interested in
88
+ # # because there are files covered at 0 in the report
89
+ # command: npm i -D check-code-coverage && npm run coverage:check-files:windows
90
+ # working_directory: test-apps/old-cypress-config/all-files
23
91
24
92
publish :
25
93
description : Publishes the new version of the plugin to NPM
26
94
docker :
27
- - image : cimg/node:16.9.1
95
+ - image : cimg/node:16.16.0
28
96
environment :
29
97
# we don't need Cypress to do the release
30
98
CYPRESS_INSTALL_BINARY : ' 0'
40
108
41
109
cyrun :
42
110
docker :
43
- - image : cypress/base:16.13.2
111
+ - image : cypress/base:16.16.0
44
112
parameters :
45
113
jobname :
46
114
type : string
@@ -66,13 +134,10 @@ jobs:
66
134
67
135
test-code-coverage-plugin :
68
136
docker :
69
- - image : cypress/base:16.13.2
137
+ - image : cypress/base:16.16.0
70
138
steps :
71
139
- attach_workspace :
72
140
at : ~/
73
- - run :
74
- name : Install deps
75
- command : npm ci
76
141
- run :
77
142
command : npm run test
78
143
- store_artifacts :
@@ -84,34 +149,19 @@ jobs:
84
149
workflows :
85
150
build :
86
151
jobs :
87
- - cypress/install :
88
- cache-key : ' cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}'
89
- pre-steps :
90
- - run : npm i -g npm@latest
91
- post-install :
92
- - run :
93
- name : Install deps for test-apps/old-cypress-config
94
- command : npm ci
95
- working_directory : test-apps/old-cypress-config
96
- - run :
97
- name : Install deps for test-apps/new-cypress-config
98
- command : npm ci
99
- working_directory : test-apps/new-cypress-config
100
- post-steps :
101
- - run : npm run check:markdown
102
-
152
+ - install_and_persist
103
153
- lint :
104
154
requires :
105
- - cypress/install
155
+ - install_and_persist
106
156
107
157
- test-code-coverage-plugin :
108
158
requires :
109
- - cypress/install
159
+ - install_and_persist
110
160
111
161
- cyrun :
112
162
name : test-<< matrix.jobname>>
113
163
requires :
114
- - cypress/install
164
+ - install_and_persist
115
165
matrix :
116
166
parameters :
117
167
jobname :
@@ -143,89 +193,88 @@ workflows:
143
193
- new-cypress-config/unit-tests-js
144
194
- new-cypress-config/use-webpack
145
195
146
- - cypress/run :
147
- name : Windows test
148
- executor :
149
- # executor comes from the "windows" orb
150
- name : win/default
151
- shell : bash.exe
152
- no-workspace : true
153
- start : npm run start:windows --prefix test-apps/old-cypress-config/all-files
154
- wait-on : ' http://localhost:1234'
155
- command : npx cypress run --project test-apps/old-cypress-config/all-files
156
- # store screenshots and videos
157
- store_artifacts : true
158
- cache-key : ' cache-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}'
159
- post-checkout :
160
- - run :
161
- name : Install node 16
162
- command : nvm install 16.13.2
163
- - run :
164
- name : Use node 16
165
- command : nvm use 16.13.2
166
- - run :
167
- name : Install deps for code coverage
168
- command : npm ci
169
- post-install :
170
- - run :
171
- name : Install deps for test-apps/old-cypress-config
172
- command : npm ci
173
- working_directory : test-apps/old-cypress-config
174
- post-steps :
175
- # store the created coverage report folder
176
- # you can click on it in the CircleCI UI
177
- # to see live static HTML site
178
- - store_artifacts :
179
- path : test-apps/old-cypress-config/all-files/coverage
180
- # make sure the examples captures 100% of code
181
- - run :
182
- name : Verify Code Coverage
183
- command : npm run coverage:verify
184
- working_directory : test-apps/old-cypress-config/all-files
185
- - run :
186
- name : Check code coverage files 📈
187
- # we will check the final coverage report
188
- # to make sure it only has files we are interested in
189
- # because there are files covered at 0 in the report
190
- command : npm i -D check-code-coverage && npm run coverage:check-files:windows
191
- working_directory : test-apps/old-cypress-config/all-files
196
+ # - cypress/run:
197
+ # name: Windows test
198
+ # executor:
199
+ # # executor comes from the "windows" orb
200
+ # name: win/default
201
+ # shell: bash.exe
202
+ # # no-workspace: true
203
+ # start-command: npm run start:windows --prefix test-apps/old-cypress-config/all-files
204
+ # # wait-on: 'http://localhost:1234'
205
+ # cypress-command: npx cypress run --project test-apps/old-cypress-config/all-files
206
+ # # store screenshots and videos
207
+ # # store_artifacts: true
208
+ # post-checkout:
209
+ # - run:
210
+ # name: Install node 16
211
+ # command: nvm install 16.16.0
212
+ # - run:
213
+ # name: Use node 16
214
+ # command: nvm use 16.16.0
215
+ # - run:
216
+ # name: Install deps for code coverage
217
+ # command: npm ci
218
+ # post-install:
219
+ # - run:
220
+ # name: Install deps for test-apps/old-cypress-config
221
+ # command: npm ci
222
+ # working_directory: test-apps/old-cypress-config
223
+ # post-steps:
224
+ # # store the created coverage report folder
225
+ # # you can click on it in the CircleCI UI
226
+ # # to see live static HTML site
227
+ # - store_artifacts:
228
+ # path: test-apps/old-cypress-config/all-files/coverage
229
+ # # make sure the examples captures 100% of code
230
+ # - run:
231
+ # name: Verify Code Coverage
232
+ # command: npm run coverage:verify
233
+ # working_directory: test-apps/old-cypress-config/all-files
234
+ # - run:
235
+ # name: Check code coverage files 📈
236
+ # # we will check the final coverage report
237
+ # # to make sure it only has files we are interested in
238
+ # # because there are files covered at 0 in the report
239
+ # command: npm i -D check-code-coverage && npm run coverage:check-files:windows
240
+ # working_directory: test-apps/old-cypress-config/all-files
192
241
193
- - publish :
194
- filters :
195
- branches :
196
- only :
197
- - master
198
- - beta
199
- - next
200
- - dev
201
- requires :
202
- - lint
203
- - test-code-coverage-plugin
204
- - test-old-cypress-config/all-files
205
- - test-old-cypress-config/backend
206
- - test-old-cypress-config/before-all-visit
207
- - test-old-cypress-config/before-each-visit
208
- - test-old-cypress-config/exclude-files
209
- - test-old-cypress-config/frontend
210
- - test-old-cypress-config/fullstack
211
- - test-old-cypress-config/one-spec
212
- - test-old-cypress-config/same-folder
213
- - test-old-cypress-config/support-files
214
- - test-old-cypress-config/ts-example
215
- - test-old-cypress-config/unit-tests-js
216
- - test-old-cypress-config/use-webpack
217
- - test-new-cypress-config/all-files
218
- - test-new-cypress-config/backend
219
- - test-new-cypress-config/before-all-visit
220
- - test-new-cypress-config/before-each-visit
221
- - test-new-cypress-config/cra-e2e-and-ct
222
- - test-new-cypress-config/exclude-files
223
- - test-new-cypress-config/frontend
224
- - test-new-cypress-config/fullstack
225
- - test-new-cypress-config/one-spec
226
- - test-new-cypress-config/same-folder
227
- - test-new-cypress-config/support-files
228
- - test-new-cypress-config/ts-example
229
- - test-new-cypress-config/unit-tests-js
230
- - test-new-cypress-config/use-webpack
231
- - Windows test
242
+ # - publish:
243
+ # filters:
244
+ # branches:
245
+ # only:
246
+ # - master
247
+ # - beta
248
+ # - next
249
+ # - dev
250
+ # requires:
251
+ # - lint
252
+ # - test-code-coverage-plugin
253
+ # - test-old-cypress-config/all-files
254
+ # - test-old-cypress-config/backend
255
+ # - test-old-cypress-config/before-all-visit
256
+ # - test-old-cypress-config/before-each-visit
257
+ # - test-old-cypress-config/exclude-files
258
+ # - test-old-cypress-config/frontend
259
+ # - test-old-cypress-config/fullstack
260
+ # - test-old-cypress-config/one-spec
261
+ # - test-old-cypress-config/same-folder
262
+ # - test-old-cypress-config/support-files
263
+ # - test-old-cypress-config/ts-example
264
+ # - test-old-cypress-config/unit-tests-js
265
+ # - test-old-cypress-config/use-webpack
266
+ # - test-new-cypress-config/all-files
267
+ # - test-new-cypress-config/backend
268
+ # - test-new-cypress-config/before-all-visit
269
+ # - test-new-cypress-config/before-each-visit
270
+ # - test-new-cypress-config/cra-e2e-and-ct
271
+ # - test-new-cypress-config/exclude-files
272
+ # - test-new-cypress-config/frontend
273
+ # - test-new-cypress-config/fullstack
274
+ # - test-new-cypress-config/one-spec
275
+ # - test-new-cypress-config/same-folder
276
+ # - test-new-cypress-config/support-files
277
+ # - test-new-cypress-config/ts-example
278
+ # - test-new-cypress-config/unit-tests-js
279
+ # - test-new-cypress-config/use-webpack
280
+ # - Windows test
0 commit comments