forked from 5monkeys/django-bananas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (49 loc) · 1.4 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
sudo: false
language: python
cache: pip
# Tox cannot install pythons, so we set 3.5 as default, use 3.4 already
# available in container and then include 3.6 in matrix.
python:
- 3.5
env:
# NOTE: On Travis web page define private STASH_URL, STASH_TOKEN, STASH_SECRET.
global:
- STASH_BOX=$TRAVIS_REPO_SLUG:$TRAVIS_BUILD_NUMBER:$STASH_SECRET
matrix:
- TOXENV=py34-django18
- TOXENV=py34-django19
- TOXENV=py34-django110
- TOXENV=py34-django111
- TOXENV=py34-django20
- TOXENV=py35-django18
- TOXENV=py35-django19
- TOXENV=py35-django110
- TOXENV=py35-django111
- TOXENV=py35-django20
matrix:
include:
- python: 3.6
env: TOXENV=py36-django111
- python: 3.6
env: TOXENV=py36-django20
- python: 3.4 # i.e. skip installing 3.5
env: TOXENV=lint
- python: 3.4
env: TOXENV=coverage # run it after tests to collect reports from other jobs
install:
- pip install tox stasher
script:
- if [[ $TOXENV =~ coverage ]] && [ -n "$STASH_SECRET" ]; then
stash pull $STASH_BOX -wc $(TOXENV= tox -l | wc -l);
fi
- if [[ ! $TOXENV =~ coverage ]] || [ -n "$STASH_SECRET" ]; then
tox;
fi
- if [[ $TOXENV =~ py ]] && [ -n "$STASH_SECRET" ]; then
stash push $STASH_BOX $(ls .coverage.*);
fi
after_success:
- if [[ $TOXENV =~ coverage ]]; then
pip install --quiet python-coveralls;
coveralls --ignore-errors;
fi