Checks are different between r-lib/actions/check-r-package@v2 and local rcmdcheck

Hi, I maintain an R package and will submit it to CRAN. Every now and then I run following rcmdcheck statement locally:

rcmdcheck::rcmdcheck(args = c("--as-cran", "--no-manual"), build_args = c("--no-manual"))

I do this because the 'check-r-package' action from r-lib does not seem to behave in the same way, even while it uses the same default values for the above arguments.

I list two differences here, but there may be more:

  • in Github Actions, the CRAN incoming feasibility check is not run (example). Locally, I get:
─  checking CRAN incoming feasibility ... [7s/25s] NOTE (25.5s)
   Maintainer: ‘Floris Vanderhaeghe <xxx@yyy.zz>’
   
   New submission
   
   Version contains large components (0.0.0.9000)
   
   Suggests or Enhances not in mainstream repositories:
     spDataLarge
   Availability using Additional_repositories specification:
     spDataLarge   yes   https://geocompr.r-universe.dev
  • in Github Actions, the package subdirectories check yields no note:
* checking package subdirectories ... OK

but locally it gives a note:

N  checking package subdirectories ...
   Problems with news in ‘NEWS.md’:
   No news entries found.

These notes are also present when I run checks on win-builder using devtools::check_win_devel(). So I believe it would be nice if this behaviour would be matched more closely in GH Actions. Could it be that the --as-cran argument in GH Actions is not effective for some reason?

r-lib/actions/check-r-package@v2 sets

_R_CHECK_CRAN_INCOMING_=false

here:

because it does not seem important to see this note for every single GHA build.
Please open an issue in the r-lib/actions repo if you want to be able to customize this.

For the NEWS.md entries, you need the commonmark and xml2 packages installed, otherwise that check is skipped. It might make sense to install these (and other optional R CMD check dependencies ) automatically, or in the example workflow, please open an issue in the r-lib/actions repo if you feel strongly about this. Thanks!

OK, thanks for these insights Gabor! Then there's no bug involved.

I had missed the env setting indeed. Perhaps I will propose a tweak to control this (defaulting to current behaviour).

I have no strong opinion about whether the extra packages needed to check NEWS.md should be installed in the example workflow. But it's good to know this at least.

1 Like

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.