Skip to content

Commit dc2bd3a

Browse files
committed
changed travis.yml to get travis ci running with cypress https://github.com/cypress-io/cypress-example-kitchensink/blob/master/.travis.yml
1 parent 6709ab9 commit dc2bd3a

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

.travis.yml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,50 @@
11
language: node_js
2+
23
node_js:
3-
- 10
4-
env:
5-
matrix:
6-
- REACT=16.3
4+
# Node 10.3+ includes npm@6 which has good "npm ci" command
5+
- 10.8
6+
77
cache:
8+
# cache both npm modules and Cypress binary
89
directories:
910
- ~/.npm
1011
- ~/.cache
11-
install:
12-
- npm ci
13-
script:
14-
- npm test
12+
override:
13+
- npm ci
14+
- npm run cy:verify
15+
16+
defaults: &defaults
17+
script:
18+
# ## print all Travis environment variables for debugging
19+
- $(npm bin)/print-env TRAVIS
20+
- npm start -- --silent &
21+
- npm run cy:run -- --record --parallel --group $STAGE_NAME
22+
# after all tests finish running we need
23+
# to kill all background jobs (like "npm start &")
24+
- kill $(jobs -p) || true
25+
26+
jobs:
27+
include:
28+
# we have multiple jobs to execute using just a single stage
29+
# but we can pass group name via environment variable to Cypress test runner
30+
- stage: test
31+
env:
32+
- STAGE_NAME=1x-electron
33+
<<: *defaults
34+
# run tests in parallel by including several test jobs with same name variable
35+
- stage: test
36+
env:
37+
- STAGE_NAME=4x-electron
38+
<<: *defaults
39+
- stage: test
40+
env:
41+
- STAGE_NAME=4x-electron
42+
<<: *defaults
43+
- stage: test
44+
env:
45+
- STAGE_NAME=4x-electron
46+
<<: *defaults
47+
- stage: test
48+
env:
49+
- STAGE_NAME=4x-electron
50+
<<: *defaults

0 commit comments

Comments
 (0)