From d8d641d67b4370f9a77b2ec28a9abda3f0fd6b01 Mon Sep 17 00:00:00 2001 From: Ralf Stubner Date: Sun, 7 Apr 2024 11:19:39 +0200 Subject: [PATCH] Add new GHA workflow for testing reverse dependencies --- .github/workflows/R-CMD-check.yaml | 4 +- .github/workflows/pkgdown.yaml | 2 +- .github/workflows/revdepcheck.yaml | 62 ++++++++++++++++++++++++++++ .github/workflows/test-coverage.yaml | 2 +- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/revdepcheck.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index fb0f857..741cafe 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -29,14 +29,14 @@ jobs: - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} + - {os: ubuntu-latest, r: 'oldrel'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 087f0b0..fb6645f 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -20,7 +20,7 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 diff --git a/.github/workflows/revdepcheck.yaml b/.github/workflows/revdepcheck.yaml new file mode 100644 index 0000000..0ad9a1d --- /dev/null +++ b/.github/workflows/revdepcheck.yaml @@ -0,0 +1,62 @@ +# https://github.com/dieghernan/tidyterra/blob/main/.github/workflows/revdepcheck.yaml +on: + workflow_dispatch: + +name: revdepcheck + +jobs: + revdepcheck: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + cache-version: revdep + extra-packages: | + local::. + any::usethis + any::BiocManager + any::BiocVersion + any::devtools + any::remotes + r-lib/revdepcheck + needs: check + + - name: revdepcheck + run: | + + revdepcheck::revdep_reset() + revdepcheck::revdep_check(num_workers = 4) + + + revdepig <- c( + "checks", "library", "checks.noindex", "library.noindex", + "data.sqlite", "*.html" ) + + usethis::use_git_ignore(revdepig, directory = file.path(".", "revdep")) + + # Ignore this also on build + usethis::use_build_ignore("revdep") + + shell: Rscript {0} + + # Commit all changed files back to the repository + - uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 2c5bb50..d3f65be 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -15,7 +15,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 with: