-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
57 lines (50 loc) · 1.56 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
54
55
56
57
## our React TodoMVC app is written
## in node so thats what we select.
## Cypress is agnostic to your apps
## backend language though.
language: node_js
node_js:
- 10
addons:
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
- libgconf-2-4
## Cache NPM folder and Cypress binary
## to avoid downloading Cypress again and again
cache:
directories:
- ~/.npm
- ~/.cache
install:
# use the new "ci" command for fastest installs on CI
- npm ci
before_script:
## runs the 'start' script which
## boots our local app server on port 8000
## which cypress expects to be running
## -----------------------------------
## the '-- --silent' passes arguments
## to http-server which silences its output
## else our travis logs would be cluttered
## with output from HTTP requests
## https://docs.npmjs.com/cli/start
## https://github.com/indexzero/http-server
## ---------------------------------------
## we use the '&' ampersand which tells
## travis to run this process in the background
## else it would block execution and hang travis
- npm start -- --silent &
script:
## now run cypress headlessly
## and record all of the tests.
## Cypress will search for a
## CYPRESS_RECORD_KEY environment
## variable by default and apply
## this to the run.
- npm run cypress:run
## alternatively we could specify
## a specific record key to use
## like this without having to
## configure environment variables
## - cypress run --record --key <your_record_key>