Skip to content

Commit

Permalink
GA: modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jun 30, 2024
1 parent 97eaf42 commit 639a094
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 50 deletions.
1 change: 1 addition & 0 deletions .github/workflows/covr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ jobs:
print(coverage)
covr::codecov(coverage = coverage, token="${{secrets.CODECOV_TOKEN}}")
shell: Rscript {0}

42 changes: 17 additions & 25 deletions .github/workflows/future_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

timeout-minutes: 30

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

name: future.plan=${{ matrix.future.plan }}

Expand All @@ -26,7 +26,6 @@ jobs:

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
## R CMD check
_R_CHECK_LENGTH_1_LOGIC2_: true
Expand All @@ -42,35 +41,28 @@ jobs:

- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true

- name: Query R package dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v3
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
extra-packages: |
any::rcmdcheck
any::remotes
any::sessioninfo
any::covr
needs: check

- name: Install R package system dependencies (Linux)
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
- name: Install dependencies
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
remotes::install_deps(dependencies = TRUE)
install.packages(".", repos=NULL, type="source")
shell: Rscript {0}

- name: Install R package dependencies
- name: Session info
run: |
remotes::install_deps(dependencies = TRUE)
install.packages(".", repos=NULL, type="source") ## needed by parallel workers
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Install 'future.tests' and any backend R packages
Expand Down
35 changes: 10 additions & 25 deletions .github/workflows/revdepcheck-top.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

timeout-minutes: 30

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

name: ${{ matrix.config.pkg }} (${{ matrix.config.r }}) ${{ matrix.config.label }}

Expand Down Expand Up @@ -51,36 +51,21 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v3
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
extra-packages: |
any::rcmdcheck
any::remotes
any::sessioninfo
any::covr
needs: check

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
install.packages(".", repos=NULL, type="source") ## needed by parallel workers
install.packages(".", repos=NULL, type="source")
install.packages("${{ matrix.config.pkg }}", dependencies=TRUE)
shell: Rscript {0}

Expand Down

0 comments on commit 639a094

Please sign in to comment.