diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eaf2a3e8..2f590a54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,13 +52,18 @@ jobs: - name: Install PyCall run: python ci/install_pycall.py - name: Run test - run: python -m tox + run: python -m tox -- --cov=julia env: CI: 'true' # run tests marked by @only_in_ci TOXENV: py PYJULIA_TEST_REBUILD: 'yes' - run: cat .tox/py/log/pytest.log if: always() + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + name: codecov-umbrella check: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 8ad9f55d..30c63854 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ pip-log.txt .coverage .pytest_cache .tox +coverage.xml nosetests.xml # Translations diff --git a/.travis.yml b/.travis.yml index cf54835c..2eedadc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,5 +71,4 @@ script: - cat .tox/py/log/pytest.log after_success: - - .tox/py/bin/coverage combine .coverage - coveralls diff --git a/tox.ini b/tox.ini index ddede667..68aff25c 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,13 @@ commands = --log-file {envlogdir}/pytest.log \ {posargs} +commands_post = + # Strip off ".tox/..." from the coverage + # (see also [[coverage:paths]]): + -coverage combine .coverage + -coverage xml + -coverage report + setenv = PYJULIA_TEST_PYTHON_JL_IS_INSTALLED = yes @@ -66,6 +73,7 @@ deps = -r{toxinidir}/docs/requirements.txt commands = sphinx-build -b "html" -d build/doctrees {posargs} source "build/html" +commands_post = changedir = {toxinidir}/docs [testenv:style] @@ -75,3 +83,4 @@ deps = commands = isort --recursive --check-only . black . {posargs:--check --diff} +commands_post =