/
.travis.yml
82 lines (68 loc) · 1.49 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
language: node_js
sudo: false
node_js:
- 10
- 11
- 12
- 13
- lts/*
- node
os:
- windows
- linux
- osx
matrix:
fast_finish: true
allow_failures:
- os: windows
cache:
directories:
- $HOME/.npm
- ~/.npm
- ~/.yarn-cache
- travis_phantomjs
- node_modules
npm: true
apt: true
services:
- mongodb
#- mysql
#- redis
#- postgrsql
dist: bionic
#If you install a service in the addons: section, such as MariaDB, you do not need to add it to the services: section as well.
addons:
hosts:
#- localhost.test
apt:
sources:
#- ubuntu-toolchain-r-test
#- ppa:chris-lea/redis-server
packages:
#- redis-tools
#- redis-server
#- gcc-4.8
#- g++-4.8
env:
global:
- NODE_ENV=testing
#- CXX=g++-4.8
- SENDGRID_KEY=sendgridKey
- MASTER_KEY=masterKey
- JWT_SECRET=jwtSecret
branches:
only:
- master
- /^greenkeeper-.*$/
- /^greenkeeper/.*$/
before_install:
install:
#- npm i npm@latest -g
script:
- npm run lintfix
- npm run lint
# skip tests on linux with node lts and do coverage instead
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_NODE_VERSION" != "lts/*" ]]; then npm test ; fi
# run coverage and docs only on linux with node lts
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_NODE_VERSION" == "lts/*" ]]; then npm run coverage ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_NODE_VERSION" == "lts/*" ]]; then npm run docs ; fi