-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a new subflow which checks the package against specific cran sna…
…pshot(s)
- Loading branch information
Henrik Sparre Spiegelhauer (HSPU)
committed
Apr 16, 2024
1 parent
cc21c2f
commit 9e85fcf
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
# R-CMD check which allows you to lock the R version and date of the CRAN snapshot. | ||
# This is particularly helpful for ensuring that the package works with internal systems. | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
permissions: read-all | ||
|
||
name: R-CMD-check-versions | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.os }} (R ${{ matrix.config.r }}, ${{ matrix.config.date }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- windows-latest | ||
- ubuntu-latest | ||
config: | ||
- date: 2023-10-25 # Lock the date of the CRAN snapshot | ||
r: 4.3.1 | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: r-lib/actions/setup-pandoc@v2 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
use-public-rspm: false | ||
|
||
- name: Install curl | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt install libcurl4-openssl-dev | ||
- name: Install dependencies | ||
run: > | ||
options( | ||
repos = c(CRAN = "https://packagemanager.posit.co/cran/${{ matrix.config.date }}") | ||
) | ||
|
||
install.packages(c("attachment", "rcmdcheck"), Ncpus = parallel::detectCores()-1) | ||
|
||
|
||
attachment::att_from_description(field = c("Depends", "Imports", "Suggests")) |> | ||
install.packages(Ncpus = parallel::detectCores()-1) | ||
|
||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
run: | | ||
sessionInfo() | ||
installed.packages()[,c("Package", "Version")] | ||
shell: Rscript {0} | ||
|
||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
args: 'c("--no-manual", "--as-cran")' | ||
upload-snapshots: true | ||
error-on: '"error"' | ||
check-dir: '"check"' | ||
upload-results: true |