Skip to content

Commit f0cdd79

Browse files
committed
Use Codecov to report coverage
1 parent fd08263 commit f0cdd79

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/pipeline.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,32 @@ jobs:
194194
run: |
195195
pip install . --no-deps --no-build-isolation
196196
python -m unittest discover tests
197+
198+
coverage:
199+
runs-on: ubuntu-latest
200+
steps:
201+
- uses: actions/checkout@v4
202+
- name: Setup environment
203+
shell: bash -l {0}
204+
run: |
205+
echo -e "channels:\n - conda-forge\n" > .condarc
206+
sed '/- python/d' binder/environment.yml > environment.yml
207+
echo '- coverage' >> environment.yml
208+
- name: Setup Mambaforge
209+
uses: conda-incubator/setup-miniconda@v3
210+
with:
211+
python-version: '3.12'
212+
miniforge-version: latest
213+
condarc-file: .condarc
214+
environment-file: environment.yml
215+
- name: Test
216+
shell: bash -l {0}
217+
timeout-minutes: 30
218+
run: |
219+
pip install . --no-deps --no-build-isolation
220+
coverage run -m unittest discover tests
221+
coverage xml
222+
- name: Upload coverage reports to Codecov
223+
uses: codecov/codecov-action@v5
224+
with:
225+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)