-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
40 lines (34 loc) · 891 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
38
39
40
language: python
sudo: false
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=py35
- TOXENV=lint
- TOXENV=coverage
matrix:
include:
- env: TOXENV=py36
python: 3.6
install:
- pip install --upgrade pip
- 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