Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 32 additions & 50 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,39 @@
## Thin caller -- the matrix, system dependencies, caching and the check itself
## live in PredictiveEcology/actions. Pinned @main deliberately: tags freeze and
## rot (this repo's revdeps workflow sat on install-spatial-deps@v0.3, whose
## ubuntugis PPA installs a GDAL that is ABI-incompatible with Posit's noble
## cache). The actions repo gates merges with its own self-test CI.
##
## Triggers were [master, development]. There is no `master` branch here and the
## default branch is `main`, so this workflow had never run on main at all.

name: R-CMD-check

on:
push:
branches:
- master
- development
branches: [main, development]
pull_request:
branches:
- master
- development
branches: [main, development]

name: R-CMD-check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
R-CMD-check:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'devel'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel-1'}
- {os: windows-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
OMP_THREAD_LIMIT: 4
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
Ncpus: 4
r-version: ${{ matrix.config.r }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
uses: PredictiveEcology/actions/.github/workflows/R-CMD-check.yaml@main
secrets: inherit
with:
## The org default matrix covers macOS release, windows devel/release/
## oldrel-1, ubuntu devel/release/oldrel-1 and a nosuggests leg (a gain --
## there was no _R_CHECK_DEPENDS_ONLY_ leg before).
##
## The extra legs exist to cover the declared floor. DESCRIPTION says
## `R (>= 4.3)`, and with release at 4.6 that floor is oldrel-3 -- which
## the hand-rolled matrix never tested: it stopped at oldrel-2, so the
## DESCRIPTION claim was unverified. ubuntu oldrel-3 tests it. The
## oldrel-2 legs are carried over from the previous matrix.
extra-config: |
[{"config": {"os": "ubuntu-latest", "nosuggests": false, "r": "oldrel-2"}},
{"config": {"os": "windows-latest", "nosuggests": false, "r": "oldrel-2"}},
{"config": {"os": "ubuntu-latest", "nosuggests": false, "r": "oldrel-3"}}]
49 changes: 10 additions & 39 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,19 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
## Thin caller -- the pkgdown build and the gh-pages deploy live in
## PredictiveEcology/actions. The hand-rolled version was already identical to
## the shared one step for step, so nothing is customised here.

name: pkgdown

on:
push:
branches: [main, master]
branches: [main]
pull_request:
branches: [main, master]
branches: [main]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
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:
extra-packages: |
any::pkgdown
local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
branch: gh-pages
folder: docs
uses: PredictiveEcology/actions/.github/workflows/pkgdown.yaml@main
secrets: inherit
72 changes: 20 additions & 52 deletions .github/workflows/revdeps.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,25 @@
## Workflow derived from https://github.com/r-lib/actions/tree/v2/examples and
## https://github.com/yihui/crandalf/blob/main/.github/workflows/rev-check.yaml
## Thin caller -- the job harness (checkout, geospatial system libraries, R,
## dependency install) and the revdeps-check action live in
## PredictiveEcology/actions.
##
## Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
## Was: pull_request + weekly across a THREE-OS matrix, calling the composite
## action directly. The shared action's own README warns revdep checks are too
## resource intensive for standard runners, and each revdep gets a full
## R CMD check with its dependency closure installed first -- hours of runner
## time per PR, for a signal almost no PR changes. Now dispatch plus the same
## weekly schedule, on the shared single-leg default.
##
## This also drops the stale install-spatial-deps@v0.3 pin; the shared workflow
## uses @main, which is what PR #43 was opened to fix.

name: revdeps

on:
pull_request:
branches: [main, master, development]
schedule:
- cron: '23 23 * * 0 '
workflow_dispatch:

name: revdeps-check
schedule:
- cron: '23 23 * * 0'

jobs:
revdeps-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
OMP_THREAD_LIMIT: 4
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

steps:
- uses: actions/checkout@v4

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

- uses: PredictiveEcology/actions/install-spatial-deps@v0.3

- uses: r-lib/actions/setup-r@v2
with:
extra-repositories: https://predictiveecology.r-universe.dev
Ncpus: 4
r-version: ${{ matrix.config.r }}
use-public-rspm: false

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
any::systemfonts
needs: check

- uses: PredictiveEcology/actions/revdeps-check@main
with:
quiet: false
timeout: 30
revdeps:
uses: PredictiveEcology/actions/.github/workflows/revdeps.yaml@main
secrets: inherit
51 changes: 22 additions & 29 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
## Thin caller -- covr, the codecov upload and the trace-file handling live in
## PredictiveEcology/actions.
##
## Two behaviour changes worth knowing, both improvements:
## * runs on ubuntu-latest, not macOS-latest (the shared default);
## * the shared workflow sets NOT_CRAN=true, so skip_on_cran() tests now run
## under coverage. That raises the measured figure and can surface tests
## that had never executed in CI. Require hit exactly that on migration.
##
## Triggers were [master, development]; there is no `master` branch here.

name: test-coverage

on:
push:
branches:
- master
- development
branches: [main, development]
pull_request:
branches:
- master
- development
branches: [main, development]

name: test-coverage
## Never cancel a push/merge coverage run -- covr is slow and merges land close
## together, so cancelling one reads as spurious red. PRs are fair game.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test-coverage:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: macOS-latest
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:
extra-packages: |
any::covr

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
uses: PredictiveEcology/actions/.github/workflows/test-coverage.yaml@main
secrets: inherit
Loading