Skip to content

Commit

Permalink
Merge pull request #170 from pypa/codecov
Browse files Browse the repository at this point in the history
WIP: Codecov integration
  • Loading branch information
auvipy authored Jul 5, 2019
2 parents 6fdab9f + b12da19 commit ed684aa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[paths]
source =
auditwheel/
/auditwheel_src/auditwheel
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ before_install:

install:
- pip install -r test-requirements.txt
- pip install tox
- pip install .

- pip install tox codecov
- pip install -e .

script:
- tests/travis.sh
11 changes: 9 additions & 2 deletions tests/integration/test_manylinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def docker_container_ctx(image, io_dir, env_variables={}):
if src_folder is None:
pytest.skip('Can only be run from the source folder')
vols = {'/io': io_dir, '/auditwheel_src': src_folder}
for key in env_variables:
if key.startswith('COV_CORE_'):
env_variables[key] = env_variables[key].replace(src_folder,
'/auditwheel_src')

container = docker_start(image, vols, env_variables)
try:
Expand Down Expand Up @@ -114,10 +118,13 @@ def any_manylinux_container(request, io_folder):
policy = request.param
image = MANYLINUX_IMAGES[policy]
env = {'PATH': PATH[policy]}
for key in os.environ:
if key.startswith('COV_CORE_'):
env[key] = os.environ[key]

with docker_container_ctx(image, io_folder, env) as container:
docker_exec(container, 'pip install -U pip setuptools')
docker_exec(container, 'pip install -U /auditwheel_src')
docker_exec(container, 'pip install -U pip setuptools pytest-cov')
docker_exec(container, 'pip install -U -e /auditwheel_src')
yield policy, container


Expand Down
3 changes: 2 additions & 1 deletion tests/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if [[ "$WHEELHOUSE" == "1" ]]; then
elif [[ "$LINTER" == "1" ]]; then
tox -e lint
else
pytest -s
pytest -s --cov auditwheel --cov-branch
auditwheel lddtree $(python -c 'import sys; print(sys.executable)')
codecov || true # Ignore failures from codecov tool
fi

0 comments on commit ed684aa

Please sign in to comment.