-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
42 lines (42 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
sudo: required
language: python
python:
- "3.6"
addons:
ssh_known_hosts:
- 104.236.68.6
- 159.203.182.32
services:
- docker
before_install:
- sudo apt-get remove docker docker-engine docker.io
- sudo apt-get update
- sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install docker-ce
- docker-compose version
- docker version
before_script:
- docker-compose up --build -d
script:
- docker exec sdcurve coverage run --source="." manage.py test **/api/tests/
- docker exec sdcurve coverage report -m
- docker exec sdcurve coverage xml
- docker exec sdcurve python-codacy-coverage -r coverage.xml
deploy:
# deploy to staging enviroment
- provider: script
script: bash staging-deploy.sh
skip_cleanup: true
on:
branch: develop
# deploy to production enviroment
- provider: script
script: bash production-deploy.sh
skip_cleanup: true
on:
branch: master