Include Renv library with github action check-r-package

Hey guys, first time here.

I am trying to automate my testing wth the github action check-r-package. However for some reason this action is not picking up my renv installed libraries. I double checked whether renv contained "shiny" and it did. So i am wondering why it doesn't use this on the check-r-package. I will show the github action and error response below.

Thanks for the help in advance!

name: 'Automation of Testing'

on: pull_request

jobs:
  automate-test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Install dependencies
        run: |
          sudo apt-get install libcurl4-openssl-dev
      - name: Setting up R
        uses: r-lib/actions/setup-r@v2

      - name: Installing and activating renv
        uses: r-lib/actions/setup-renv@v2

      - name: Install rcmdcheck
        shell: Rscript {0}
        run: renv::install("rcmdcheck")

      - name: Test package
        uses: r-lib/actions/check-r-package@v2
        with:
          upload-snapshots: true
Run r-lib/actions/check-r-package@v2
Run ## --------------------------------------------------------------------
ℹ Using R 4.2.2 (lockfile was generated with R 4.1.3)
── R CMD build ─────────────────────────────────────────────────────────────────
* checking for file ‘.../DESCRIPTION’ ... OK
* preparing ‘CGI’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘CGI_0.0.1.tar.gz’

── R CMD check ─────────────────────────────────────────────────────────────────
* using log directory ‘/home/runner/work/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/check/CGI.Rcheck’
* using R version 4.2.2 (2022-10-31)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --as-cran’
* checking for file ‘CGI/DESCRIPTION’ ... OK
* this is package ‘CGI’ version ‘0.0.1’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking serialization versions ... OK
* checking whether package ‘CGI’ can be installed ... ERROR
Error: Installation failed.
See ‘/home/runner/work/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/check/CGI.Rcheck/00install.out’ for details.
* DONE

Status: 1 ERROR
See
  ‘/home/runner/work/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/check/CGI.Rcheck/00check.log’
for details.

── R CMD check results ────────────────────────────────────────── CGI 0.0.1 ────
Duration: 1.7s

❯ checking whether package ‘CGI’ can be installed ... ERROR
  See below...

── Install failure ─────────────────────────────────────────────────────────────

* installing *source* package ‘CGI’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error: Error in library(shiny) : there is no package called ‘shiny’
Error: Error: unable to load R code in package ‘CGI’
Execution halted
Error: Error: R CMD check found ERRORs
ERROR: lazy loading failed for package ‘CGI’
Execution halted
* removing ‘/home/runner/work/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/2022-03-Visualize-gene-expression-patterns-to-help-breast-cancer-researchers/check/CGI.Rcheck/CGI’

1 error ✖ | 0 warnings ✔ | 0 notes ✔
Error: Process completed with exit code 1.

Can you link to the build log please?

I can't actually send a link to the build log of the github action since it is a private repo. So the best thing i could do i send each inidividual step of the github action. Let me know if that is helpfull or which process you would like to see!

Well, ideally I would be able to run the code, instead of looking at the output. It takes a lot more effort and time to help you without a reproducible example. E.g. you could create a public repo that reproduces this issue, without the private details of the real package.

This topic was automatically closed 42 days after the last reply. 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.