Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage from Coveralls in CI #281

Merged
merged 23 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f7f6108
Merge pull request #6 from GlacioHack/main
rhugonnet Mar 27, 2021
9c97f54
Merge branch 'GlacioHack:main' into main
rhugonnet Jun 17, 2021
3a48737
Merge branch 'GlacioHack:main' into main
rhugonnet Jul 23, 2021
c7f18be
Merge remote-tracking branch 'upstream/main'
rhugonnet Aug 9, 2021
bcd5163
Merge remote-tracking branch 'upstream/main'
rhugonnet Aug 13, 2021
864fabd
fix deramp residual and optimizer
rhugonnet Aug 13, 2021
cad1f68
Merge remote-tracking branch 'upstream/main'
rhugonnet Sep 6, 2021
561e4f2
Merge remote-tracking branch 'upstream/main'
rhugonnet Sep 8, 2021
270060e
Merge remote-tracking branch 'upstream/main'
rhugonnet Oct 14, 2021
3acaa2b
Merge remote-tracking branch 'upstream/main'
rhugonnet Nov 7, 2021
66c4ff9
Merge remote-tracking branch 'upstream/main'
rhugonnet Nov 8, 2021
3044b37
Merge remote-tracking branch 'upstream/main'
rhugonnet Nov 22, 2021
fc957ea
Merge remote-tracking branch 'upstream/main'
rhugonnet Apr 11, 2022
d238a36
Merge remote-tracking branch 'upstream/main'
rhugonnet Jun 9, 2022
0d8e922
Merge remote-tracking branch 'upstream/main'
rhugonnet Aug 1, 2022
b17285e
Merge remote-tracking branch 'upstream/main'
rhugonnet Aug 9, 2022
55af4a6
Merge remote-tracking branch 'upstream/main'
rhugonnet Aug 9, 2022
40257fe
Add coveralls GitHub Actions routine
rhugonnet Aug 12, 2022
6af4b35
Rename job build into test for coveralls
rhugonnet Aug 12, 2022
883900e
Generate coverage output with pytest
rhugonnet Aug 12, 2022
cc4354e
Specify path to pytest coverage file
rhugonnet Aug 12, 2022
f26d3e1
Convert coverage file to lcov format
rhugonnet Aug 17, 2022
d19af18
Add coverage badge
rhugonnet Aug 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: [ main ]

jobs:
build:
test:
name: ${{ matrix.os }}, python ${{ matrix.python-version}}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -56,4 +56,30 @@ jobs:
python -c "from xdem.examples import *; download_longyearbyen_examples(overwrite=False)"
- name: Test with pytest
run: |
pytest -ra -n=auto
pip install pytest-cov coveralls
pytest -ra -n=auto --cov=xdem/

# We can skip the conversion step once this PR of pytest is merged: https://github.com/pytest-dev/pytest-cov/pull/536
# and replace pytest argument by --cov-report=lcov
- name: Converting coverage to LCOV format
run: |
pip install coveragepy-lcov
coveragepy-lcov --data_file_path .coverage --output_file_path coverage.info

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.test_number }}
path-to-lcov: coverage.info
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Upload to Coveralls finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ More documentation to come!
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/xdem.svg)](https://anaconda.org/conda-forge/xdem)
[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/xdem.svg)](https://anaconda.org/conda-forge/xdem)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/xdem.svg)](https://anaconda.org/conda-forge/xdem)
[![Coverage Status](https://coveralls.io/repos/github/GlacioHack/xdem/badge.svg?branch=main)](https://coveralls.io/github/GlacioHack/xdem?branch=main)

To cite this package: [![Zenodo](https://zenodo.org/badge/doi/10.5281/zenodo.4809697.svg)](https://zenodo.org/record/4809698)

Expand Down