-
-
Notifications
You must be signed in to change notification settings - Fork 22
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 covrpage vignette to communicate package testing health #211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @yonicd , nice page! see one question inside. Also:
- Would it also be possible to let the reader click on a file name e.g. and then see highlighted which lines of code are not covered by tests?
- I would like to let @cicdguy review the github workflows
- you can add yourself to contributors in the package description
.github/workflows/R-linux.yml
Outdated
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
Rscript -e 'remotes::install_github("hadley/emo")' \ | ||
-e 'remotes::install_github("yonicd/covrpage@actions")' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need that specific branch? Did you already try to make a PR towards the main covrpage
repo? just thinking for longer term maintenance that would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The links for the tests are taking you directly to the lines that were not run. There are icons next to tests that gave either warnings/failures as a way to know which ones were the offending ones.
I merged that branch into main, so that can be amended to be yonicd/covrpage
.
Hi @yonicd, thank you for adding this. I'd prefer to simply upload the |
.github/workflows/docs.yaml
Outdated
@@ -13,6 +13,7 @@ on: | |||
jobs: | |||
docs: | |||
name: Pkgdown Docs 📚 | |||
if: "!contains(github.event.head_commit.message, 'skip docs')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Condition already exists in parent workflow: https://github.com/insightsengineering/r.pkg.template/blob/main/.github/workflows/pkgdown.yaml#L89
This tool is meant as a communication to general users the testing diversity and coverage in a package and have it accessible on the github level (can't read html in github pages). The covr html output leaves a lot of information out of the summary report which is less useful for non-programmers to digest. |
You mean like we already do on PRs like here and here? We also upload all info directly to the workflow summary, see example. |
those are great. but to @danielinteractive's question above. covrpage gives you links to each test and it will run even if test(s) fail so you get the coverage regardless and you can link directly to what was the problem area. Users of covrpage have found that having the report tests/readme.md makes the package more accessible to prospective users and helps with developmemt collaborations. |
@danielinteractive I'm okay with this as long as you're okay with this. I wouldn't take responsibility of maintaining this in the long run, however. |
Thanks @cicdguy and @yonicd - I am open to this change but I wonder a bit if we really need this and if we can only have one coverage run instead of two for each commit. In this package coverage is so high that the coverage badge which I think we have basically says all for users? For developers on the other hand the coverage report that is already generated as part of GHA is more relevant as it shows during PR what is missing. |
Architecturally, and from a technical optimization perspective, it makes sense to
That way we don't need to run 2 coverage workflows, maintain an Rmd and a README, and therefore reduce package size (by removing the README.md and the vignette). But again, totally up to you to decide how you want to proceed @danielinteractive |
Sounds like a good idea to me - @yonicd what do you think? |
It is up to you guys.
|
Thanks @yonicd! How about @cicdguy would you create a separate PR with the proposed changes and then we can compare more easily, regarding output and also regarding extra changes in the code? I guess that PR could be nice to include then also in the R package template repo so other projects can benefit. |
@cicdguy any chance we can get the alternative PR soon? |
There's a POC being done by @walkowif here: https://walkowif.github.io/tern/main/ |
Great thanks @cicdguy for the good news :-) Looking forward! Let me know when I can help testing or so. |
looks interesting. A few questions coverage:
unit testing page:
|
The size doesn't really matter as the docs will be stored outside of the R package itself. Yes there are additional assets that
We're using https://github.com/lukejpreston/xunit-viewer for creating the HTML reports. If test suites have human-readable names and so do the test cases, the report can be more intuitive. There's also https://gitlab.com/inorton/junit2html as an alternative that can be used to report the overall test report. See example here: https://inorton.gitlab.io/-/junit2html/-/jobs/3809671223/artifacts/junit2html-merged-example.xml.html, but frankly the UI doesn't seem very appealing. The former gives us the option to do some additional branding as well. We also have CI-based reporting to show test performance. See example here: insightsengineering/tern#838 (comment), which we'll add to |
added covrpage output to the package vignettes/site and tests/readme.md to help to communicate package health to prospective users.
gha also added to allow for autogeneration of readme on commit/PR