forked from streetmix/streetmix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (41 loc) · 1.17 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
language: node_js
node_js:
- lts/*
# Default distribution. If left commented out,
# Travis will upgrade distros as needed
# dist: xenial
# os: linux
addons:
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
# Required for Cypress. https://docs.cypress.io/guides/guides/continuous-integration.html#Travis
- libgconf-2-4
env:
global:
- NODE_ENV=test
- PELIAS_API_KEY=ge-iampelias
services:
- redis
before_script:
# Start the server and run it in background process
- node index &
script:
# Note: don't run `npm test` here directly, it's intended for local testing.
- commitlint-travis
- npm run jest
- npm run lint
- npm run cypress:run
after_script:
# Send coverage reports generated by jest to Codecov
- bash <(curl -s https://codecov.io/bash)
# after all tests finish running we need
# to kill all background jobs (like "npm start &")
- kill $(jobs -p) || true
cache:
# Caches $HOME/.npm when npm ci is default script command
# Caches node_modules in all other cases
npm: true
directories:
# we also need to cache folder with Cypress binary
- ~/.cache