-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
57 lines (49 loc) · 1.36 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
sudo: required
language: python
python:
- "3.6"
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.22.0
stages:
- Unit test
- Style sheet
- Deploy image homolog
- Deploy image prodution
- Upgrade service
notifications:
slack: hora-da-hora:0nFQxr2PykmKhNkJ78xYJMOP
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
jobs:
include:
- stage: "Unit test"
name: "Unit test"
script:
- make run-dc-tests
- make run-tests
- make cov-tests
- docker-compose exec api_gateway codecov -t ${CODECOV_TOKEN}
- stage: "Style sheet"
name: "Style sheet"
script:
- make build
- docker network create api-backend
- make run-d
- docker-compose exec api_gateway flake8 --ignore=E722
- stage: "Deploy image homolog"
if: branch = develop
script: bash ./scripts/deploy_homolog.sh
- stage: "Deploy image prodution"
if: branch = master
script: bash ./scripts/deploy_prod.sh
- stage: "Upgrade service"
name: "Upgrade service"
if: branch = develop
script: python ./scripts/upgrade.py
after_success:
- docker-compose down