Skip to content
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

Codecov uploads not working #941

Closed
rstub opened this issue Feb 21, 2019 · 8 comments
Closed

Codecov uploads not working #941

rstub opened this issue Feb 21, 2019 · 8 comments

Comments

@rstub
Copy link
Contributor

rstub commented Feb 21, 2019

On https://codecov.io/github/RcppCore/Rcpp?branch=master one sees no test coverage reports uploaded in the last 6 months. I guess this happened when Travis CI was changed to use docker containers. I recently had the same problem and solved it like this:

@eddelbuettel
Copy link
Member

Indeed, I had left that open. Will look into this -- thanks for the detailed suggestion.

eddelbuettel added a commit that referenced this issue Feb 26, 2019
re-enable codecov.io coverage with thanks to Ralf (closes #941)
@eddelbuettel
Copy link
Member

@rstub Looks like it broke again. I'm at a loss as to why. Any idea?

@rstub
Copy link
Contributor Author

rstub commented Mar 19, 2019

At first glance it looks like coverage dropped when you changed the version to 1.0.1: https://codecov.io/gh/RcppCore/Rcpp/commit/7ad7dc11c8cbd088737098a50ba4ecfab7be798a I remember that some tests don’t run on CRAN, ie not for releases. Is there a way to force execution of the tests even for three digit release numbers?

@eddelbuettel
Copy link
Member

Hm, but that test for 'is it a three digit release' has been there forever and has not changed

Rcpp/tests/doRUnit.R

Lines 46 to 53 in 0837b35

## force tests to be executed if in dev release which we define as
## having a sub-release, eg 0.9.15.5 is one whereas 0.9.16 is not
if (length(strsplit(packageDescription("Rcpp")$Version, "\\.")[[1]]) > 3) { # dev release, and
if (Sys.getenv("RunAllRcppTests") != "no") { # if env.var not yet set
message("Setting \"RunAllRcppTests\"=\"yes\" for development release\n")
Sys.setenv("RunAllRcppTests"="yes")
}
}

Plus we have the environment variable to override

&& echo RunAllRcppTests=yes >> ~/.R/check.Renviron

@eddelbuettel
Copy link
Member

But on reflection, I think you are spot on. "1.0.1" is a release version that turns tests off at CRAN, it does so here (by accident) so the setting in the Dockerfile simply does not work. I may need another check for a Travis environment variable in tests/doRUnit.R.

@rstub
Copy link
Contributor Author

rstub commented Mar 19, 2019

Maybe covr does not make use of ~/.R/check.Renviron? If that is the case, you could use ENV RunAllRcppTests=yes within the Dcokerfile instead.

@eddelbuettel
Copy link
Member

Yes I now suspect that covr / Travis runs as a different user to ~ aka $HOME is somewhere else.

But again, well spotted. I was so focussed on 'why does coverage not run' that I did not realize that the related 'hm jobs only take 8 mins instead of around 15 mins' was the driver. Should be better now as I altered the test driver in ~/tests/.

@eddelbuettel
Copy link
Member

Now committed.

When I wrote the comment above I had it written here but not yet pushed so you couldn't have seen that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants