Skip to content

Commit

Permalink
GH Actions. Borrwing workflow steps from inlabru.
Browse files Browse the repository at this point in the history
  • Loading branch information
famuvie committed Jul 5, 2024
1 parent 813d1fe commit 4a27f4b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
## Borrowed from inlabru. Don't know why is all this necessary.
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: "https://inla.r-inla-download.org/R/testing"

- uses: r-lib/actions/setup-pandoc@v2

Expand Down Expand Up @@ -79,7 +83,7 @@ jobs:
- name: Install INLA beforehand
run: |
install.packages("INLA", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/stable"), dep = TRUE)
install.packages("INLA", repos = c(getOption("repos"), INLA = "https://inla.r-inla-download.org/R/testing"), dep = TRUE)
shell: Rscript {0}

- name: Install dependencies
Expand All @@ -89,17 +93,15 @@ jobs:
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
- name: Session info
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
args: 'c("--no-manual", "--as-cran")'

0 comments on commit 4a27f4b

Please sign in to comment.