Skip to content

Commit

Permalink
ms609/actions/revdepcheck (#113)
Browse files Browse the repository at this point in the history
* extra-packages: ms609/TreeDistData
  • Loading branch information
ms609 authored Feb 27, 2024
1 parent bc89565 commit 1644628
Showing 1 changed file with 4 additions and 45 deletions.
49 changes: 4 additions & 45 deletions .github/workflows/revdepcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ on:
- "**.R[dD]ata"
- "**.Rpro*"

# Not using ms609/revdepcheck as pak fails with external dependencies
# https://github.com/r-lib/actions/issues/534
jobs:
mem-check:
runs-on: ubuntu-latest

name: revdepcheck, R release
name: revdepcheck

env:
_R_CHECK_CRAN_INCOMING_: true # Seemingly not set by --as-cran
Expand All @@ -62,46 +60,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: release

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = c('soft', 'Config/Needs/revdeps')), ".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@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 dependencies
run: |
remotes::install_github("r-lib/revdepcheck")
remotes::install_deps(dependencies = c('soft', 'Config/Needs/revdeps'))
shell: Rscript {0}

- name: Check reverse dependencies
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
revdepcheck::revdep_check(timeout = as.difftime(60, units = 'mins'), num_workers = 4)
problems <- readLines('revdep/problems.md', warn = FALSE)
if (length(problems) > 1) stop(paste0(problems, collapse= "\n"))
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: ms609/actions/revdepcheck@main
with:
name: revdep-results
path: revdep/*.md
deps: ${{ matrix.config.deps }}
extra-packages: ms609/TreeDistData

0 comments on commit 1644628

Please sign in to comment.