forked from senecajs/seneca-mongo-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (31 loc) · 955 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
33
34
35
36
37
38
39
40
41
language: node_js
sudo: false
env:
global:
- MONGODB=3.6.4
matrix:
node_js:
- "8"
- "10"
matrix:
fast_finish: true
install:
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${MONGODB}.tgz
- tar xzf mongodb-linux-x86_64-${MONGODB}.tgz
- ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --version
- NODE_VERSION=$(node -v); if [ ${NODE_VERSION:1:2} -ge 10 ]; then npm i -g npm@6; npm ci; else npm install; fi
before_script:
- npm uninstall seneca
- npm install seneca$SENECA_VER
- mkdir ${PWD}/mongodb-linux-x86_64-${MONGODB}/data
- ${PWD}/mongodb-linux-x86_64-${MONGODB}/bin/mongod --dbpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/data --logpath ${PWD}/mongodb-linux-x86_64-${MONGODB}/mongodb.log --fork
script:
- npm test
- if [ ${NODE_VERSION:1:2} -ge 10 ]; then npm audit; fi
after_script:
- pkill mongod
- npm run coverage
cache:
directories:
- node_modules