Skip to content

Commit

Permalink
Upload coverage to Codecov via GitHub Actions (JuliaPy#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored Aug 2, 2020
1 parent 2d2b8a2 commit 15683c7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pip-log.txt
.coverage
.pytest_cache
.tox
coverage.xml
nosetests.xml

# Translations
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,4 @@ script:
- cat .tox/py/log/pytest.log

after_success:
- .tox/py/bin/coverage combine .coverage
- coveralls
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand All @@ -75,3 +83,4 @@ deps =
commands =
isort --recursive --check-only .
black . {posargs:--check --diff}
commands_post =

0 comments on commit 15683c7

Please sign in to comment.