-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (43 loc) · 1.94 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
language: node_js
node_js:
- 11
services:
- docker
jobs:
include:
- name: "Client Build Test"
script: npm install --prefix client && npm run build --prefix client
- name: "Server Build Test"
script: npm install --prefix server && npm run build --prefix server
- name: "Server Jest Test"
script: npm install --prefix server && npm run test --prefix server
- name: "Docker Compose Dev Test"
before_install:
- echo "PORT=8081" > server/.env
- echo "TWILIO_ACCOUNT_SID=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" >> server/.env
- echo "TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" >> server/.env
- echo "TWILIO_SMS_NUMBER=+12345678901" >> server/.env
- echo "MONGO_HOSTNAME=mongo" >> server/.env
- echo "MONGO_DB=myapp_db" >> server/.env
- echo "MONGO_PORT=27017" >> server/.env
script: docker-compose -f docker-compose.dev.yml build
- name: "Docker Compose Prod Test"
before_install:
- echo "PORT=8081" > server/.env
- echo "TWILIO_ACCOUNT_SID=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" >> server/.env
- echo "TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" >> server/.env
- echo "TWILIO_SMS_NUMBER=+12345678901" >> server/.env
- echo "MONGO_HOSTNAME=mongo" >> server/.env
- echo "MONGO_DB=myapp_db" >> server/.env
- echo "MONGO_PORT=27017" >> server/.env
script: docker-compose -f docker-compose.prod.yml build
- name: "Docker Compose Test Test"
before_install:
- echo "PORT=8081" > server/.env
- echo "TWILIO_ACCOUNT_SID=ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" >> server/.env
- echo "TWILIO_AUTH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" >> server/.env
- echo "TWILIO_SMS_NUMBER=+12345678901" >> server/.env
- echo "MONGO_HOSTNAME=mongo" >> server/.env
- echo "MONGO_DB=myapp_db" >> server/.env
- echo "MONGO_PORT=27017" >> server/.env
script: docker-compose -f docker-compose.test.yml up --build