forked from cypress-io/cypress-example-kitchensink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (49 loc) · 1.33 KB
/
.travis.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
language: node_js
env:
# skip Puppeteer download, only needed for Netlify build
- PUPPETEER_SKIP_DOWNLOAD=1
node_js:
- 20
cache:
# cache both npm modules and Cypress binary
directories:
- ~/.npm
- ~/.cache
override:
- npm ci
- npm run cy:verify
- npm run cy:info
defaults: &defaults
script:
# ## print all Travis environment variables for debugging
- npx print-env TRAVIS
- npm run start &
- npm run cy:run -- --record --parallel --group $STAGE_NAME
# after all tests finish running we need
# to kill all background jobs (like "npm start &")
- kill $(jobs -p) || true
jobs:
include:
# we have multiple jobs to execute using just a single stage
# but we can pass group name via environment variable to Cypress test runner
- stage: test
env:
- STAGE_NAME="1x-electron on Travis CI"
<<: *defaults
# run tests in parallel by including several test jobs with same name variable
- stage: test
env:
- STAGE_NAME="4x-electron on Travis CI"
<<: *defaults
- stage: test
env:
- STAGE_NAME="4x-electron on Travis CI"
<<: *defaults
- stage: test
env:
- STAGE_NAME="4x-electron on Travis CI"
<<: *defaults
- stage: test
env:
- STAGE_NAME="4x-electron on Travis CI"
<<: *defaults