-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
39 lines (39 loc) · 1.59 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
sudo: true
language: python
python:
- "3.6"
addons:
ssh_known_hosts:
- 138.68.144.77
- 138.68.133.220
env:
global:
- CC_TEST_REPORTER_ID=b174adc02ae0e71e624893126348638b08d61d1b4ddb265c3077dba417f32072
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
- python3 -m pip install pip -U
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- docker-compose -f local.yml run --rm django flake8
- docker-compose -f local.yml run --rm django py.test
- docker-compose -f local.yml run --rm django coverage run -m py.test
- docker-compose -f local.yml run --rm django coverage xml
- docker-compose -f local.yml run --rm django python3 manage.py makemigrations
- docker-compose -f local.yml up --build -d
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -t coverage.py