Skip to content

Commit 217d093

Browse files
authored
Travis: upgrade tox to 2.9.1, improve cache handling (#529)
1 parent 7885f3d commit 217d093

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ matrix:
5757

5858
cache:
5959
directories:
60-
- "${TRAVIS_BUILD_DIR}/.tox"
60+
- "${TRAVIS_BUILD_DIR}/.tox/${TOXENV}"
6161

6262
install:
6363
# Create pip wrapper script, using travis_retry (a function) and
@@ -71,7 +71,7 @@ install:
7171
- sed -i.bak 's/^\[testenv\]/\0\nwhitelist_externals = travis_retry_pip\ninstall_command = travis_retry_pip install {opts} {packages}/' tox.ini
7272
- if diff tox.ini tox.ini.bak; then exit 1; fi
7373

74-
- pip install tox==2.7.0
74+
- pip install tox==2.9.1
7575
- |
7676
if [[ "${TOXENV%-checkqa}" == "$TOXENV" ]]; then
7777
export PYTEST_ADDOPTS='--cov=pytest_django --cov=tests --cov=pytest_django_test --cov-report=term-missing:skip-covered'
@@ -80,7 +80,6 @@ install:
8080
8181
script:
8282
- tox
83-
- "find ${TRAVIS_BUILD_DIR}/.tox -name 'log' -o -name '__pycache__' -type d | xargs -I {} rm -rf {}"
8483

8584
after_success:
8685
- |
@@ -96,3 +95,6 @@ after_success:
9695
codecov --required -X search gcov pycov -f coverage.xml --flags $codecov_flags
9796
fi
9897
set +x
98+
99+
before_cache:
100+
- "find ${TRAVIS_BUILD_DIR}/.tox/${TOXENV} -name 'log' -o -name '__pycache__' -type d | xargs -I {} rm -rf {}"

0 commit comments

Comments
 (0)