This repository was archived by the owner on Aug 27, 2024. It is now read-only.
forked from bahmutov/cy-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
71 lines (66 loc) · 2.34 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: 2.1
orbs:
# https://github.com/cypress-io/circleci-orb
cypress: cypress-io/cypress@1
executors:
with-ff:
docker:
# https://github.com/cypress-io/cypress-docker-images
- image: 'cypress/browsers:node-20.6.1-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1'
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
# 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
# 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
install-command: echo 'Nothing to install in this job'
no-workspace: true
# instead of "cypress run" do NPM release 😁
command: npm run semantic-release