-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy path.travis.yml
37 lines (28 loc) · 870 Bytes
/
.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
language: python
python:
- "3.8"
- "3.7"
- "3.6"
- "3.5"
sudo: required
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.18.0
- BLACK_VERSION=19.10b0
before_install:
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then bash docker-compose.sh; fi
- "cd {{cookiecutter.app_slug}}"
install:
- "pip install -r requirements.txt"
before_script:
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then docker-compose up --build -d; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install black==$BLACK_VERSION; fi
script:
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then black --line-length 79 --check --diff .; fi
- flake8 .
- python manage.py cov
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then docker-compose run web python manage.py cov; fi
after_script:
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then docker-compose down; fi