Cache pre-commit, use tox-travis to simplify config, only coverage for non-lint
language: python
-cache: pip
+cache:
+ pip: true
+ directories:
+ - $HOME/.cache/pre-commit
env:
global:
@@ -18,29 +21,24 @@ matrix:
- python: 3.8
env: TOXENV=lint
- python: 3.8
- env: TOXENV=py38
- python: 3.7
- env: TOXENV=py37
- python: 3.6
- env: TOXENV=py36
- python: 3.5
- env: TOXENV=py35
- python: pypy3
- env: TOXENV=pypy3
- allow_failures:
- - env: TOXENV=pypy3
install:
-- travis_retry pip install --upgrade pip
-- travis_retry pip install --upgrade tox
-- travis_retry pip install --upgrade coverage
+- travis_retry pip install -U pip
+- travis_retry pip install -U tox-travis
script: tox
after_success:
-- travis_retry pip install coveralls && coveralls
-- travis_retry pip install codecov && codecov
-- travis_retry pip install scrutinizer-ocular && ocular
+ - |
+ if [ "$TOXENV" != "lint" ]; then
+ travis_retry pip install -U coveralls && coveralls
+ travis_retry pip install -U codecov && codecov
+ travis_retry pip install -U scrutinizer-ocular && ocular
+ fi
deploy:
- provider: pypi
