Skip to content

Commit

Permalink
(re-)implement coverage reports via codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero authored and ltalirz committed Mar 3, 2020
1 parent 20fa6c2 commit a227bd3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ jobs:
run:
.github/workflows/tests.sh

- name: Upload coverage report
uses: codecov/codecov-action@v1.0.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: aiida-unittests-${{ matrix.backend }}
flags: ${{ matrix.backend }}
file: ./coverage.xml
fail_ci_if_error: true

verdi:

runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ verdi daemon start 4
verdi -p test_${AIIDA_TEST_BACKEND} run .ci/test_daemon.py
verdi daemon stop

# Make sure
# - omissions are taken from the top-level .coveragerc
# - coverage is reported as XML and in terminal including
# the numbers/ranges of lines which are not covered,
# - coverage results of multiple tests are collected,
# - the base directory for files to consider is aiida/
export PYTEST_ADDOPTS="--cov-config=.coveragerc --cov-report xml --cov-report term-missing --cov-append --cov=aiida"

AIIDA_TEST_PROFILE=test_$AIIDA_TEST_BACKEND pytest tests
AIIDA_TEST_PROFILE=test_$AIIDA_TEST_BACKEND pytest .ci/pytest
pytest --noconftest .ci/test_test_manager.py
Expand Down
1 change: 1 addition & 0 deletions docs/requirements_for_rtd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pygments~=2.5
pymatgen>=2019.7.2
pymysql~=0.9.3
pyparsing~=2.4
pytest-cov~=2.7
pytest-timeout~=1.3
pytest~=5.3
python-dateutil~=2.8
Expand Down
1 change: 1 addition & 0 deletions setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"pgtest~=1.3,>=1.3.1",
"pytest~=5.3",
"pytest-timeout~=1.3",
"pytest-cov~=2.7",
"sqlalchemy-diff~=0.1.3"
],
"dev_precommit": [
Expand Down

0 comments on commit a227bd3

Please sign in to comment.