Skip to content

Commit 37658ee

Browse files
authored
trying to fix coverage (#735)
* trying to fix coverage * put the coveralls call in a different job so it happens whether or not there's a failure in the tests * invalid yaml. trying again * trying to add always() so we upload to coveralls even when a test fails https://stackoverflow.com/questions/58858429/how-to-run-a-github-actions-step-even-if-the-previous-step-fails-while-still-f * added github_token, because that's what the error message said to do, but not sure why I have to https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication * added line to see whether .coverage file is being generated * added a cd down to the directory where the coverage report lives
1 parent de0a8cc commit 37658ee

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/testing.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
pip install 'numpy<2.0'
3232
pip install matplotlib #Some imports require matplotlib
3333
pip install scipy #To not skip tests
34-
pip install flake8 meson-python ninja pytest
34+
pip install flake8 meson-python ninja pytest coveralls
3535
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3636
3737
- name: Checkout Clawpack
@@ -53,4 +53,14 @@ jobs:
5353
- name: Test with pytest
5454
run: |
5555
cd ${CLAW}/pyclaw
56-
pytest --ignore=development -k "not test_shallow_sphere"
56+
coverage run --source=src -m pytest --ignore=development -k "not test_shallow_sphere"
57+
58+
- name: Upload to Coveralls
59+
if: always()
60+
run: |
61+
cd ${CLAW}/pyclaw
62+
ls -l .coverage
63+
coveralls
64+
env:
65+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[![Build Status](https://github.com/clawpack/pyclaw/actions/workflows/testing.yml/badge.svg)](https://github.com/clawpack/pyclaw/actions)
2-
[![Coverage Status](https://img.shields.io/coveralls/clawpack/pyclaw.svg)](https://coveralls.io/r/clawpack/pyclaw?branch=master)
3-
2+
[![Coverage Status](https://coveralls.io/repos/github/clawpack/pyclaw/badge.svg?branch=master)](https://coveralls.io/r/clawpack/pyclaw?branch=master)
43
[![PyPI version](https://badge.fury.io/py/clawpack.svg)](https://badge.fury.io/py/clawpack)
54

65

0 commit comments

Comments
 (0)