-
Notifications
You must be signed in to change notification settings - Fork 19
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
Code Coverage #54
Code Coverage #54
Conversation
The ci.yml updates add a commit to PRs. I tested this locally using `act` as best I could, but ran into an issue that I think will resolve when running on the real runner (undefined head). We'll see how it works when the workflows actually run ...
The new workflow adds a badge to the readme based on coverage for Python 3.12.
@aweakley I might not have enough permissions for this to run (need to be able to modify comments on the PR) |
I've made some changes on https://github.com/ixc/python-edtf/tree/53_coverage_ci_check which amounts to this. I think if we want to include those other items in the printed report we need to add
|
- Switch to using pytest-django to run the Django tests, as that has JUnit support. Add Django settings as a flag rather than in pyproject.toml because defining it there makes the normal pytest run fail since it can't find the module. - Adds a simple script using junitparser to combine the two JUnit XML files.
79f78f0
to
5d3d80c
Compare
``` File read successfully "/home/runner/work/python-edtf/python-edtf/./combined_junit_pytest.xml" Warning: Your comment is too long (maximum is 65536 characters), coverage report will not be added. Warning: Try add: "--cov-report=term-missing:skip-covered", or add "hide-report: true", or add "report-only-changed-files: true", or switch to "multiple-files" mode ```
@aweakley I rebased in your changes, added JUnit XML outputs, and tried adding back the JUnit stats. I was getting an error because the comments were too long and modified the coverage report to use the I think this is still failing because it is a fork: see MishaKav/pytest-coverage-comment#68. Not sure if you can tweak these permissions: MishaKav/pytest-coverage-comment#68 (comment). Otherwise you could try another branch off of this to see if the tests pass and then merge either that branch or this PR - I think the fork aspect is making this a bit of a headache. |
It's got that permission already: I've made another branch, but I'm getting the same-looking error, although I can see the output above now: https://github.com/ixc/python-edtf/actions/runs/9217035942/job/25358362828#step:12:25 |
Ah 7e15e89 fixes it. I'll merge |
Thank you. |
The
ci.yml
updates add a commit to PRs. I tested this locally usingact
as best I could, but ran into an issue that I think will resolve when running on the real runner (undefined head).The new workflow adds a badge to the readme based on coverage for Python 3.12.
This PR also removes some unnecessary files.
Closes #53