-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
94 lines (80 loc) · 1.75 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
dist: xenial
os: linux
language: python
git:
depth: false
python:
- "3.6"
- "3.7"
- "3.8"
cache:
pip: true
directories:
- node_modules
- $HOME/.cache/pip
- $HOME/.cache/pre-commit
env:
- DJANGO="==1.11.*"
- DJANGO="==2.0.*"
- DJANGO="==2.1.*"
- DJANGO="==2.2.*"
- DJANGO="==3.0.*"
- DJANGO="==3.1.*"
- DJANGO="master"
- TEST_PYPI="true"
jobs:
fast_finish: true
include:
- python: "3.8"
env:
- TEST_PRECOMMIT="true"
- python: "3.8"
env:
- DJANGO="==3.1.*"
- TEST_PYTEST_XDIST_134="==3.1.*"
exclude:
- python: "3.8"
env: DJANGO="==1.11.*"
- python: "3.8"
env: DJANGO="==2.0.*"
- python: "3.8"
env: DJANGO="==2.1.*"
before_install:
- sudo apt-get update
- sudo apt-get install -y sqlite3
install:
- |
if [ -n "$DJANGO" ]; then
[ "$DJANGO" == master ] \
&& django=https://github.com/django/django/archive/master.tar.gz \
|| django="django${DJANGO}"
fi
- pip install -r requirements_test.txt $django
- |
if [ -n "$TEST_PYPI" ]; then
if [ -n "$TRAVIS_TAG" ]; then
pip install -r requirements_dev.txt
pip install pytest-django-queries --pre
fi
elif [ -n "$TEST_PRECOMMIT" ]; then
pip install pre-commit
else
./setup.py develop \
&& pip install -e .[dev]
fi
- |
[ -z "$TEST_PYTEST_XDIST_134" ] || pip install pytest-xdist\<2.0
script:
- |
if [ -n "$TEST_PYPI" ]; then
if [ -n "$TRAVIS_TAG" ]; then
pytest
else
echo Nothing to do >&2
fi
elif [ -n "$TEST_PRECOMMIT" ]; then
pre-commit run --all-files
else
coverage run --source pytest_django_queries -m pytest
fi
after_success: codecov