This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
config.yml
125 lines (115 loc) · 3.28 KB
/
config.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: 2.1
orbs:
# use latest 1.x.y version of the orb
# best practice is to use an exact version
cypress: cypress-io/[email protected]
node: circleci/[email protected]
executors:
chrome80-ff72:
docker:
- image: 'cypress/browsers:node13.6.0-chrome80-ff72'
# simplest use case - do everything in a single job
# workflows:
# build:
# jobs:
# - cypress/run
# run tests using Chrome browser
# (requires custom executor with Cypress docker image that has Chrome installed)
# workflows:
# build:
# jobs:
# - cypress/run:
# executor: cypress/browsers-chrome69
# browser: chrome
# single job, but build the app and start server
# workflows:
# build:
# jobs:
# - cypress/run:
# build: "npm run build"
# start: "npm run server"
# run only specific spec file
# workflows:
# build:
# jobs:
# - cypress/run:
# record: false
# spec: "cypress/integration/*-b.js"
jobs:
unit:
executor:
name: node/default
tag: '12'
steps:
- checkout
- node/with-cache:
steps:
- run: npm ci
- run: npm test
# custom cypress run command
workflows:
# a workflow to run on dependency updates with Renovate
dependencies:
jobs:
- cypress/run:
name: test dependencies
filters:
branches:
only: /renovate.*/
no-workspace: true
record: true
tags: dependencies,renovate
build:
jobs:
# could not run unit tests on Circle, validating config files
# always caused an error:
# Error: Configuration version 2.1 requires the "Enable Pipelines" project setting.
# Enable pipelines under Project Settings -> Advanced Settings.
# In order to retrigger pipelines, you must push a new commit.
#
# - unit
# checks out code and installs dependencies once
- cypress/run:
filters:
branches:
ignore: /^renovate/
name: Mochawesome report
# it is a single job, so no need to
# cache workspace (faster!)
no-workspace: true
command: 'npm run report'
post-steps:
- store_test_results:
path: cypress/results
# run tests inside Docker image with Chrome pre-installed
- cypress/run:
filters:
branches:
ignore: /^renovate/
name: Chrome 80
executor: chrome80-ff72
no-workspace: true
record: true
browser: chrome
# before running tests, show if any environment variables
# starting with CYPRESS are set
# using https://github.com/bahmutov/print-env
build: npx has-env CYPRESS
# realistic case: install in 1 job,
# run tests in parallel on several machines after that
# workflows:
# build:
# jobs:
# # checks out code and installs dependencies once
# - cypress/install:
# build: 'npm run build'
# # runs on 3 machines, load balances tests
# # and records on Cypress Dashboard
# - cypress/run:
# requires:
# - cypress/install
# record: true
# parallel: true
# parallelism: 3
# group: '3x'
# start: 'npm run server'