From f86fa39fc3a9f50b812870c4d23efe390afff1d6 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 9 Feb 2018 15:53:07 +0100 Subject: [PATCH] enable coverage on Travis - ensure pip is up to date - enable pip caching - run tests with Python 3.6 - publish coverage to codecov --- .gitignore | 2 ++ .travis.yml | 19 ++++++++++++------- dev-requirements.txt | 1 + 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 472415ec..6b357032 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ MANIFEST .DS_Store .cache +.coverage +htmlcov repo2docker/s2i diff --git a/.travis.yml b/.travis.yml index 9e89916a..a01c3d18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,25 @@ language: python sudo: required +cache: pip services: - docker python: -- 3.4 +- 3.6 install: -# Make a wheel and install it to test to catch possible -# issues with MANIFEST.in -- pip install --no-cache-dir -r dev-requirements.txt -- python setup.py bdist_wheel -- pip install dist/*.whl + # Make a wheel and install it to test to catch possible + # issues with releases + - pip install --upgrade setuptools pip + - pip install -r dev-requirements.txt + - python setup.py bdist_wheel + - pip install dist/*.whl script: # cd into tests so CWD being repo2docker does not hide # possible issues with MANIFEST.in - - cd tests && pytest -s -v ${REPO_TYPE} + - cd tests && pytest --cov repo2docker -s -v ${REPO_TYPE} +after_success: + - pip install codecov + - codecov jobs: include: diff --git a/dev-requirements.txt b/dev-requirements.txt index 4afcffba..e38fe6fc 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,4 @@ pyyaml pytest wheel +pytest-cov