Add CI workflow to check test coverage#225
Conversation
|
@MakisH @IshaanDesai, plz review! The threshold is currently set to 70% in check_coverage.py .if u want smthing different let me know. |
|
This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there: https://precice.discourse.group/t/gsoc-2026-aditya-gupta/2773/1 |
|
@AdityaGupta716 can you please take a look at the CI output of the test coverage workflow? It seems like the workflow got stuck. |
|
@IshaanDesai hi, fixed the issue the workflow was hanging because unittest discover was picking up the parallel tests (test_adaptivity_parallel.py, test_global_adaptivity_lb.py) which need MPI to run. changed it to run each test file explicitly instead — same approach as the existing run-unit-tests.yml. Also current coverage is around 22%, so the 70% threshold might need adjusting , happy to change it to whatever you think fits! |
|
Good work so far! I am surprised that the test coverage is not 70%, though I perceive it as having a certain value. The CI log, however, shows 0% test coverage, which seems definitely incorrect. Can you please take a look at what is going on? |
…ests from tests/unit
|
hi @IshaanDesai fixed the 0% coverage issue! The problem was the .coverage file wasn't being found correctly. The workflow now runs all serial and parallel unit tests with mpirun and combines the results, giving a real coverage of ~61%. I've set the threshold to 60% for now plz review and let me know if you think it should be different |
|
@Snapex2409, to increase test coverage, some tests on things that you recently implemented have been added. Can you please go over them to ensure that they make sense? |
… add PYTHONPATH to CI workflow
Snapex2409
left a comment
There was a problem hiding this comment.
Overall, nicely done. With the requested changes, coverage should also increase a bit.
Co-authored-by: Alex Hocks <73783301+Snapex2409@users.noreply.github.com>
Snapex2409
left a comment
There was a problem hiding this comment.
Just the small refactory, then we should be ready to merge in my opinion.
And good thinking to mock the connection here 👍
|
@Snapex2409 nah no reasons, moved it up |
Closes #55
Adds a workflow to check test coverage on every push and pull request using Coverage.py.
Changes:
The threshold can be adjusted in check_coverage.py as the codebase grows.