Skip to content

Commit e9bf305

Browse files
committed
Travis-ci updates and repairs
Since travis does a shallow clone by default, a problem can emerge when the last tag is outside the clone depth. In such cases, setup.py cannot determine the stgit version and silently fails to generate the builtin_version.py file. The shallow clone problem is solved by conditionally unshallowing the repo if no tags are found. Another problem is that coveralls is not available for Python 2.6. This problem is solved by conditionally installing coveralls only for the 'coverage-test' build targets. The travis configuration is also modified to remove the 'sudo:' config option. Using `sudo: false` caused the builds to be run in a containerized environment whereas `sudo: true` caused a virtual machine environment to be used. Removing `sudo:` altogether indicates to Travis that the stgit build can use their default environment which is transitioning to VM's. Lastly, instead of specifying `dist: trusty` the config now specifies `group: travis_latest`. In the immediate term, the builds will still use the trusty (Ubuntu 14.04) environment since that is still Travis' latest, but future builds will use newer environments as Travis makes them available. Signed-off-by: Peter Grayson <[email protected]>
1 parent ffd7fb7 commit e9bf305

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.travis.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
dist: trusty
2-
sudo: false
3-
1+
group: travis_latest
42
language: python
3+
cache: pip
54

65
matrix:
76
include:
@@ -28,12 +27,11 @@ matrix:
2827
- python: '2.6'
2928

3029
install:
31-
- pip install coveralls
30+
- if [ $MAKE_TARGET = coverage-test ]; then pip install coveralls; fi
31+
- git describe --tags --abbrev=4 || git pull --unshallow
3232

33-
script: make $MAKE_TARGET
33+
script:
34+
- make $MAKE_TARGET
3435

3536
after_success:
36-
coveralls
37-
38-
cache:
39-
- pip
37+
- if [ $MAKE_TARGET = coverage-test ]; then coveralls; fi

0 commit comments

Comments
 (0)