-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (26 loc) · 1.23 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
language: python
python:
- 3.6
before-install:
- sudo apt-get update
install:
- sudo apt-get install docker curl -y
- sudo curl -L https://github.com/docker/compose/releases/download/1.20.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./django_rest_denunciation/cc-test-reporter
- chmod +x ./django_rest_denunciation/cc-test-reporter
before_script:
- sudo docker-compose run command ./cc-test-reporter before-build
script:
- sudo docker-compose run command flake8 --exclude=migrations,manage.py,settings.py,wsgi.py
- cd django_rest_denunciation/ && sudo docker-compose run command pylint $(find -name __init__.py | cut -d '/' -f 2 | sort -u | tr '\n' ' '); cd ..
- sudo docker-compose up -d
- sudo docker-compose run command mkdir -p tests_coverage
- sudo docker-compose run command coverage run ./manage.py test
- sudo docker-compose run command coverage report
- sudo docker-compose run command coverage xml
after_script:
- sudo docker-compose run command ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
branch:
only:
- master