-
Notifications
You must be signed in to change notification settings - Fork 50
/
.travis.yml
35 lines (34 loc) · 909 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
language: python
sudo: false
env:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=pypy
- TOXENV=flake8
install:
- travis_retry pip install python-coveralls
- travis_retry pip install tox
script:
- tox
after_success:
- coveralls
after_script:
- |
env | sort
if [ ! -f coverage.xml ]; then
echo "No coverage.xml found; skipping sending coverage to couverture.io"
return
fi
if [ $TRAVIS_PULL_REQUEST != false ]; then
REAL_COMMIT=$(git log -n 1 $TRAVIS_COMMIT_RANGE --format="%H")
PR_NUM=$TRAVIS_PULL_REQUEST
else
REAL_COMMIT=$TRAVIS_COMMIT
fi
curl \
--verbose --insecure \
--header "X-Couverture-Pull-Request: $PR_NUM" \
--data-binary @coverage.xml \
"https://app.couverture.io/coverage/github/SurveyMonkey/pyteamcity/$REAL_COMMIT/$TOXENV"