File tree Expand file tree Collapse file tree 1 file changed +44
-8
lines changed Expand file tree Collapse file tree 1 file changed +44
-8
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
+
2
3
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
+
7
7
cache :
8
+ # cache both npm modules and Cypress binary
8
9
directories :
9
10
- ~/.npm
10
11
- ~/.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
You can’t perform that action at this time.
0 commit comments