2
2
version : 2.1
3
3
orbs :
4
4
# https://github.com/cypress-io/circleci-orb
5
- cypress : cypress-io/cypress@1.29 .0 # used to run e2e tests
6
- win : circleci/windows@2 # run a test job on Windows
5
+ cypress : cypress-io/cypress@3.0 .0 # used to run e2e tests
6
+ win : circleci/windows@5.0.0 # run a test job on Windows
7
7
8
8
jobs :
9
9
lint :
10
10
description : Checks the code formatting
11
11
docker :
12
- - image : cimg/node:16.9.1
12
+ - image : cimg/node:16.16.0
13
13
environment :
14
14
# we don't need Cypress to check code styl
15
15
CYPRESS_INSTALL_BINARY : ' 0'
@@ -20,11 +20,70 @@ jobs:
20
20
name : Code style check 🧹
21
21
command : npm run format:check
22
22
- run : npm run check:markdown
23
+
24
+ install_and_persist :
25
+ executor : cypress/default
26
+ steps :
27
+ - cypress/install
28
+ - run :
29
+ name : Install deps for test-apps/old-cypress-config
30
+ command : npm ci
31
+ working_directory : test-apps/old-cypress-config
32
+ - run :
33
+ name : Install deps for test-apps/new-cypress-config
34
+ command : npm ci
35
+ working_directory : test-apps/new-cypress-config
36
+ - run : npm run check:markdown
37
+ - persist_to_workspace :
38
+ paths :
39
+ - .cache/Cypress
40
+ - project
41
+ root : ~/
42
+
43
+ windows_test :
44
+ executor :
45
+ # executor comes from the "windows" orb
46
+ name : win/default
47
+ shell : bash.exe
48
+ steps :
49
+ - checkout
50
+ - run :
51
+ name : Install node 16
52
+ command : nvm install 16.16.0
53
+ - run :
54
+ name : Use node 16
55
+ command : nvm use 16.16.0
56
+ - run :
57
+ name : Install deps for code coverage
58
+ command : npm ci
59
+ - run :
60
+ name : Install deps for test-apps/old-cypress-config
61
+ command : npm ci
62
+ working_directory : test-apps/old-cypress-config
63
+ - cypress/run-tests :
64
+ # no-workspace: true
65
+ start-command : npm run start:windows --prefix test-apps/old-cypress-config/all-files
66
+ # wait-on: 'http://localhost:1234'
67
+ cypress-command : npx cypress run --project test-apps/old-cypress-config/all-files
68
+ # store screenshots and videos
69
+ # store_artifacts: true
70
+ - run :
71
+ # make sure the examples captures 100% of code
72
+ name : Verify Code Coverage
73
+ command : npm run coverage:verify
74
+ working_directory : test-apps/old-cypress-config/all-files
75
+ - run :
76
+ name : Check code coverage files 📈
77
+ # we will check the final coverage report
78
+ # to make sure it only has files we are interested in
79
+ # because there are files covered at 0 in the report
80
+ command : npm i -D check-code-coverage && npm run coverage:check-files:windows
81
+ working_directory : test-apps/old-cypress-config/all-files
23
82
24
83
publish :
25
84
description : Publishes the new version of the plugin to NPM
26
85
docker :
27
- - image : cimg/node:16.9.1
86
+ - image : cimg/node:16.16.0
28
87
environment :
29
88
# we don't need Cypress to do the release
30
89
CYPRESS_INSTALL_BINARY : ' 0'
40
99
41
100
cyrun :
42
101
docker :
43
- - image : cypress/base:16.13.2
102
+ - image : cypress/base:16.16.0
44
103
parameters :
45
104
jobname :
46
105
type : string
@@ -66,13 +125,10 @@ jobs:
66
125
67
126
test-code-coverage-plugin :
68
127
docker :
69
- - image : cypress/base:16.13.2
128
+ - image : cypress/base:16.16.0
70
129
steps :
71
130
- attach_workspace :
72
131
at : ~/
73
- - run :
74
- name : Install deps
75
- command : npm ci
76
132
- run :
77
133
command : npm run test
78
134
- store_artifacts :
@@ -84,34 +140,19 @@ jobs:
84
140
workflows :
85
141
build :
86
142
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
-
143
+ - install_and_persist
103
144
- lint :
104
145
requires :
105
- - cypress/install
146
+ - install_and_persist
106
147
107
148
- test-code-coverage-plugin :
108
149
requires :
109
- - cypress/install
150
+ - install_and_persist
110
151
111
152
- cyrun :
112
153
name : test-<< matrix.jobname>>
113
154
requires :
114
- - cypress/install
155
+ - install_and_persist
115
156
matrix :
116
157
parameters :
117
158
jobname :
@@ -142,54 +183,7 @@ workflows:
142
183
- new-cypress-config/ts-example
143
184
- new-cypress-config/unit-tests-js
144
185
- new-cypress-config/use-webpack
145
-
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
192
-
186
+ - windows_test
193
187
- publish :
194
188
filters :
195
189
branches :
@@ -228,4 +222,4 @@ workflows:
228
222
- test-new-cypress-config/ts-example
229
223
- test-new-cypress-config/unit-tests-js
230
224
- test-new-cypress-config/use-webpack
231
- - Windows test
225
+ - windows_test
0 commit comments