1 |
Replace the code responsible for installing dependencies and running |
2 |
tests on Travis to use tox. This reduces code duplication (= risk |
3 |
of mis-sync) and saves us from those hoops needed to install |
4 |
dependencies conditionally via travis. |
5 |
--- |
6 |
.travis.yml | 28 ++++++---------------------- |
7 |
1 file changed, 6 insertions(+), 22 deletions(-) |
8 |
|
9 |
diff --git a/.travis.yml b/.travis.yml |
10 |
index 9313fc645..846308e08 100644 |
11 |
--- a/.travis.yml |
12 |
+++ b/.travis.yml |
13 |
@@ -8,30 +8,14 @@ python: |
14 |
|
15 |
# command to install dependencies |
16 |
install: |
17 |
- - sudo apt-get update -qq |
18 |
- - sudo apt-get install -y libxml2-utils |
19 |
- - pip install lxml |
20 |
- # python3.6+ has sha3 built-in, for older versions install pysha3 |
21 |
- # (except for pypy where pysha3 is broken) |
22 |
- - "[[ ${TRAVIS_PYTHON_VERSION} == 3.[6789] || ${TRAVIS_PYTHON_VERSION} == pypy ]] || pip install pysha3" |
23 |
- # python3.6+ has blake2 built-in, for older versions install pyblake2 |
24 |
- - "[[ ${TRAVIS_PYTHON_VERSION} == 3.[6789] ]] || pip install pyblake2" |
25 |
- # always install pygost for Streebog |
26 |
- - pip install pygost |
27 |
- # pyyaml is needed for building |
28 |
- - pip install pyyaml |
29 |
+ - pip install tox |
30 |
|
31 |
script: |
32 |
- printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg |
33 |
- ./setup.py test |
34 |
- ./setup.py install --root=/tmp/install-root |
35 |
- # prevent repoman tests from trying to fetch metadata.xsd |
36 |
- - mkdir -p /tmp/install-root/usr/lib/portage/cnf |
37 |
- - cp repoman/cnf/metadata.xsd /tmp/install-root/usr/lib/portage/cnf/ |
38 |
- - sudo rsync -a /tmp/install-root/. / |
39 |
- - python -b -Wd -m portage.tests.runTests |
40 |
- # repoman test block |
41 |
- - repoman/setup.py test |
42 |
- - repoman/setup.py install --root=/tmp/install-root |
43 |
- - sudo rsync -a /tmp/install-root/. / |
44 |
- - python -b -Wd -m repoman.tests.runTests |
45 |
+ - if [[ ${TRAVIS_PYTHON_VERSION} == ?.? ]]; then |
46 |
+ tox -e py${TRAVIS_PYTHON_VERSION/./}; |
47 |
+ else |
48 |
+ tox -e ${TRAVIS_PYTHON_VERSION}; |
49 |
+ fi |
50 |
-- |
51 |
2.18.0 |