forked from streetmix/streetmix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (37 loc) · 1.13 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
language: node_js
node_js:
# 10.13 includes npm@6 which has good "npm ci" command, and is LTS
- 10.13
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
# Turns on newer container-based infrastructure
# This generates a sudo warning with mongodb below, see here: https://github.com/travis-ci/travis-ci/issues/3044
sudo: false
env:
global:
- NODE_ENV: test
services:
- mongodb
- redis-server
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
after_failure:
- sudo service mongod status
cache: npm