Skip to content

Commit

Permalink
fix(ci): upgrade circleci cypress orb version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Michel Leclercq committed Sep 15, 2023
1 parent 5cb72d6 commit 1d39778
Showing 1 changed file with 10 additions and 47 deletions.
57 changes: 10 additions & 47 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,34 @@
version: 2.1
orbs:
# https://github.com/cypress-io/circleci-orb
cypress: cypress-io/cypress@1

executors:
with-ff:
docker:
- image: 'cypress/browsers:node18.12.0-chrome103-ff107'
cypress: cypress-io/cypress@3

workflows:
build:
jobs:
# first, run a single job to install dependencies and Cypress
# and perform a few more small steps like linting
- cypress/install:
name: Install
build: npm run build
post-steps:
- run:
name: Show info 📺
command: npx cypress info
# catch accidental "it.only" tests
- run:
name: Catch accidental "it.only" 🖐
command: npm run stop-only

# reuse the workspace from the install job
# to run end-to-end tests in Electron browser
- cypress/run:
name: Electron test
requires:
- Install
install-command: echo 'Nothing to install in this job'
# to run tests, we need to start the web application
start: npm start
wait-on: 'http://localhost:3003'
no-workspace: true
store_artifacts: true
post-install: npm run build
start-command: npm start
cypress-command: "npx wait-on@latest http://localhost:3003 && npx cypress run"

# reuse the workspace from the install job
# to run end-to-end tests in Firefox browser
- cypress/run:
name: Firefox test
executor: with-ff
requires:
- Install
install-command: echo 'Nothing to install in this job'
# to run tests, we need to start the web application
start: npm start
wait-on: 'http://localhost:3003'
# run tests using Firefox browser pre-installed in the executor image
browser: firefox
no-workspace: true
store_artifacts: true
install-browsers: true
post-install: npm run build
start-command: npm start
cypress-command: "npx wait-on@latest http://localhost:3003 && npx cypress run --browser firefox"

# wait for all jobs to finish and possible run NPM release
- cypress/run:
name: NPM release
executor: with-ff
requires:
- Install
- Electron test
- Firefox test
# nothing to install - cypress/install job does it
# and nothing to pass to the next job
post-install: npm install
install-command: echo 'Nothing to install in this job'
no-workspace: true
# instead of "cypress run" do NPM release 😁
command: npm run semantic-release
cypress-command: npm run semantic-release

0 comments on commit 1d39778

Please sign in to comment.