forked from cypress-io/cypress-example-kitchensink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (28 loc) · 766 Bytes
/
.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
language: node_js
node_js:
# Node 10.3+ includes npm@6 which has good "npm ci" command
- 10.8
# if using Ubuntu 16 need this library
# https://github.com/cypress-io/cypress-documentation/pull/1647
addons:
apt:
packages:
- libgconf-2-4
cache:
# cache both npm modules and Cypress binary
directories:
- ~/.npm
- ~/.cache
# install dependencies and check that Cypress can run
override:
- npm ci
- npm run cy:verify
script:
# start server in the background
- npm run start:ci &
# run all Cypress tests and record on the dashboard
- npm run cy:run -- --record
# after all tests finish running we need
# to kill all background jobs (like "npm start &")
# this avoids flake in Travis jobs
- kill $(jobs -p) || true