Skip to content

Commit bd065d4

Browse files
authored
Merge pull request #629 from cypress-io/chore/update_cypress_orb
chore: update cypress and windows orb
2 parents abd408e + e17836a commit bd065d4

File tree

1 file changed

+71
-77
lines changed

1 file changed

+71
-77
lines changed

.circleci/config.yml

Lines changed: 71 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
version: 2.1
33
orbs:
44
# 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
77

88
jobs:
99
lint:
1010
description: Checks the code formatting
1111
docker:
12-
- image: cimg/node:16.9.1
12+
- image: cimg/node:16.16.0
1313
environment:
1414
# we don't need Cypress to check code styl
1515
CYPRESS_INSTALL_BINARY: '0'
@@ -20,11 +20,70 @@ jobs:
2020
name: Code style check 🧹
2121
command: npm run format:check
2222
- 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
2382

2483
publish:
2584
description: Publishes the new version of the plugin to NPM
2685
docker:
27-
- image: cimg/node:16.9.1
86+
- image: cimg/node:16.16.0
2887
environment:
2988
# we don't need Cypress to do the release
3089
CYPRESS_INSTALL_BINARY: '0'
@@ -40,7 +99,7 @@ jobs:
4099

41100
cyrun:
42101
docker:
43-
- image: cypress/base:16.13.2
102+
- image: cypress/base:16.16.0
44103
parameters:
45104
jobname:
46105
type: string
@@ -66,13 +125,10 @@ jobs:
66125

67126
test-code-coverage-plugin:
68127
docker:
69-
- image: cypress/base:16.13.2
128+
- image: cypress/base:16.16.0
70129
steps:
71130
- attach_workspace:
72131
at: ~/
73-
- run:
74-
name: Install deps
75-
command: npm ci
76132
- run:
77133
command: npm run test
78134
- store_artifacts:
@@ -84,34 +140,19 @@ jobs:
84140
workflows:
85141
build:
86142
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
103144
- lint:
104145
requires:
105-
- cypress/install
146+
- install_and_persist
106147

107148
- test-code-coverage-plugin:
108149
requires:
109-
- cypress/install
150+
- install_and_persist
110151

111152
- cyrun:
112153
name: test-<< matrix.jobname>>
113154
requires:
114-
- cypress/install
155+
- install_and_persist
115156
matrix:
116157
parameters:
117158
jobname:
@@ -142,54 +183,7 @@ workflows:
142183
- new-cypress-config/ts-example
143184
- new-cypress-config/unit-tests-js
144185
- 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
193187
- publish:
194188
filters:
195189
branches:
@@ -228,4 +222,4 @@ workflows:
228222
- test-new-cypress-config/ts-example
229223
- test-new-cypress-config/unit-tests-js
230224
- test-new-cypress-config/use-webpack
231-
- Windows test
225+
- windows_test

0 commit comments

Comments
 (0)