-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (37 loc) · 1.07 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
# first say what language we use
language: node_js
# what version - array
node_js:
- "11.7"
# now define dist use as base image for vm of ci
# trusty is specific version of linux
dist: trusty
# now define services we require for our
# like db or outside modules
services:
- mongodb
- redis-server
# env var when run on ci server
env:
- NODE_ENV=ci PORT=3000
# let travis server know to cache node modules to increase speed for next time
cache:
directories:
- node_modules
- client/node_modules
# couple of commands we want to executed at cl
# to get our project ready
install:
- npm install
# specific to this project
- npm run build
# similar to i start server and exec tests
# & run this command on sub shell(background) = let us still use command line cool
# then server killed with pkill node
# nohup no hang up dont care about shell closed or tied keep process running
# must give server delay to dont run so soon tiny pause for req
script:
- nohup npm run start &
- sleep 3
- npm run test
# must connect mongodb and redis to our CI machine => url and port