Skip to content

Commit 1cecdce

Browse files
author
Jean-Michel Leclercq
committed
fix(ci): upgrade circleci cypress orb version
1 parent 5cb72d6 commit 1cecdce

File tree

1 file changed

+19
-49
lines changed

1 file changed

+19
-49
lines changed

circle.yml

Lines changed: 19 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,41 @@
11
version: 2.1
22
orbs:
33
# https://github.com/cypress-io/circleci-orb
4-
cypress: cypress-io/cypress@1
4+
cypress: cypress-io/cypress@3
55

6-
executors:
7-
with-ff:
8-
docker:
9-
- image: 'cypress/browsers:node18.12.0-chrome103-ff107'
6+
jobs:
7+
node-18:
8+
executor:
9+
name: cypress/default
10+
node-version: "18.16.1"
11+
steps:
12+
- cypress/run:
13+
post-install: npm run build
14+
start-command: npm start
1015

1116
workflows:
1217
build:
1318
jobs:
14-
# first, run a single job to install dependencies and Cypress
15-
# and perform a few more small steps like linting
16-
- cypress/install:
17-
name: Install
18-
build: npm run build
19-
post-steps:
20-
- run:
21-
name: Show info 📺
22-
command: npx cypress info
23-
# catch accidental "it.only" tests
24-
- run:
25-
name: Catch accidental "it.only" 🖐
26-
command: npm run stop-only
27-
28-
# reuse the workspace from the install job
2919
# to run end-to-end tests in Electron browser
30-
- cypress/run:
20+
- node-18:
3121
name: Electron test
32-
requires:
33-
- Install
34-
install-command: echo 'Nothing to install in this job'
35-
# to run tests, we need to start the web application
36-
start: npm start
37-
wait-on: 'http://localhost:3003'
38-
no-workspace: true
39-
store_artifacts: true
22+
cypress-command: "npx wait-on@latest http://localhost:3003 && npx cypress run"
4023

41-
# reuse the workspace from the install job
4224
# to run end-to-end tests in Firefox browser
43-
- cypress/run:
25+
- node-18:
4426
name: Firefox test
45-
executor: with-ff
46-
requires:
47-
- Install
48-
install-command: echo 'Nothing to install in this job'
49-
# to run tests, we need to start the web application
50-
start: npm start
51-
wait-on: 'http://localhost:3003'
52-
# run tests using Firefox browser pre-installed in the executor image
53-
browser: firefox
54-
no-workspace: true
55-
store_artifacts: true
27+
install-browsers: true
28+
cypress-command: "npx wait-on@latest http://localhost:3003 && npx cypress run --browser firefox"
5629

5730
# wait for all jobs to finish and possible run NPM release
58-
- cypress/run:
31+
- node-18:
5932
name: NPM release
60-
executor: with-ff
6133
requires:
62-
- Install
6334
- Electron test
6435
- Firefox test
65-
# nothing to install - cypress/install job does it
66-
# and nothing to pass to the next job
36+
post-install: npm install
37+
start-command: echo 'Nothing to start in this job'
6738
install-command: echo 'Nothing to install in this job'
68-
no-workspace: true
6939
# instead of "cypress run" do NPM release 😁
70-
command: npm run semantic-release
40+
cypress-command: npm run semantic-release
7141

0 commit comments

Comments
 (0)