Skip to content

Commit

Permalink
Merge pull request #178 from prjemian/177-coverage
Browse files Browse the repository at this point in the history
report unit test code coverage
  • Loading branch information
prjemian authored Dec 24, 2021
2 parents 65b18e1 + a0ac875 commit 496c7bf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/unit-tests-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,35 @@ jobs:
- name: Install Python package & test requirements
run: |
$CONDA/bin/conda env update --file environment.yml --name $ENV_NAME
$CONDA/bin/conda install pytest yaml pyyaml ruamel_yaml --name $ENV_NAME
$CONDA/bin/conda install coverage coveralls pytest pyyaml ruamel_yaml yaml --name $ENV_NAME
$CONDA/bin/conda list -r --name $ENV_NAME
env:
PY_VER: ${{ matrix.python-version }}
ENV_NAME: anaconda-test-env-py-${{ matrix.python-version }}

- name: Run tests with pytest
- name: Run tests with pytest & coverage
run: |
source $CONDA/bin/activate $ENV_NAME
pytest -vvv .
coverage run --concurrency=thread --parallel-mode -m pytest -vvv .
coverage combine
env:
PY_VER: ${{ matrix.python-version }}
ENV_NAME: anaconda-test-env-py-${{ matrix.python-version }}

- name: Coverage Report
run: |
source $CONDA/bin/activate $ENV_NAME
coverage report
env:
PY_VER: ${{ matrix.python-version }}
ENV_NAME: anaconda-test-env-py-${{ matrix.python-version }}

- name: Upload to coveralls
# https://github.com/TheKevJames/coveralls-python
run: |
source $CONDA/bin/activate $ENV_NAME
coveralls --service=github
env:
PY_VER: ${{ matrix.python-version }}
ENV_NAME: anaconda-test-env-py-${{ matrix.python-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Production
Development
***********

:0.2.7: -tba- -- publish documentation on GitHub Pages
:0.2.6: 2021-12-22 -- drop support for python<3.6
:0.2.5: 2020-06-29 -- bug fix and up to date
:0.2.0: 2018-07-02 -- first tag after major refactor (#72, #105)
Expand Down

0 comments on commit 496c7bf

Please sign in to comment.