Closed ilyaZar closed 4 months ago
hi,
dont thinks It will works because we never push directly to master branch. the readme.md file will come from another branch, no ?
hi,
@VincentGuyader hmm tricky.
I think it should work because the CI rebuilds README.Rmd
which generates README.md
on any branch.
e.g. on the current dev
the codecov is 84% as generated via covr::package_covereage()
whereas on the current master
it is 69% and we see this in the "About"-readme section.
If this is the case, then the README.md
is branch dependent. And then the only thing which is tricky is the CI finding the git branch via system("git symbolic-ref --short HEAD", intern = TRUE)
.
Maybe just try? I can fix any mistakes, it would be great to have different codecov-badges for dev
and master
really.
Do you mean the CI is not triggered when you merge from dev
to master
but rather you copy the file README.md
(which comes from dev
) directly in a merge?
Actually, I was only talking about the GitHub homepage... I hadn't thought that you were referring to pkgdown, etc... so it's not that straightforward, let's try to find a way to have both?
It would indeed be cool to have different coverage based on the branch.
@VincentGuyader so breaking up the problem
regarding the standard github page I tried the commit 51113f0c6abd4432a7409563cf7ee0195fb40243
README.md
from README.Rmd
r-libs/actions/examples/render-rmarkdown.yaml
with some modifications to only render the README.Rmd
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
at the bottom of the *.yaml
regarding pkgdown: maybe it gets an automatic update from that as well but I have not had the time to look into this file yet
Let's try and merge it to an intermediate branch
I can confirm that it works, merging to dev soon
Fix #1086
This PR implements a changing codecov status badge dependening on the current git-branch of the
{golem}
projects.README.Rmd
is altered to programmatically retrieve the current git branch and alter links to point to the correct coverage results from https://about.codecov.io/ for the svg-images and webpages.