-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
45 lines (39 loc) · 1.05 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
sudo: false
language: python
# Tox cannot install pythons, so we set 3.5 as default, use 2.7 and 3.4
# already available in container and then include 3.6 in matrix.
cache: pip
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=py27
- TOXENV=py34
- TOXENV=py35
matrix:
include:
- python: 3.6
env: TOXENV=py36
- python: 3.4
env: TOXENV=lint
- python: 3.4
env: TOXENV=coverage
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