-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
35 lines (28 loc) · 1.1 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
language: python
python: '3.5'
# test multiple Django versions
matrix:
include:
# Python 3.x envs
- env: DJANGO_VERSION=2.2
install: poetry install # no need to override Django, this is default
- env: DJANGO_VERSION=1.9
- env: DJANGO_VERSION=1.5
python: '3.4' # Python 3.5+ will error on Django < 1.8: https://stackoverflow.com/a/36000103/3431180
# Poetry can't specify constraints that rely on other deps
before_install: skip
install:
# django 1.5 needs pytest-django 2.9 needs pytest 3.5 needs pytest-cov 2.6
- pip install django==1.5 pytest-django==2.9 pytest==3.5 pytest-cov==2.6
- pip install -e . # won't be able to do this if setup.py is removed!
# Python 2.7 envs
- env: DJANGO_VERSION=1.11 # latest Django that supports 2.7
python: '2.7'
before_install: pip install "poetry>=1.0.0b3"
install:
- poetry install
# override the version for each test
- poetry add -D django="~$DJANGO_VERSION"
script: pytest tests/test_project/
# upload coverage reports to CodeCov
after_script: bash <(curl -s https://codecov.io/bash)