Skip to content

ci: migrate R-CMD-check to the org reusable workflow - #31

Merged
eliotmcintire merged 12 commits into
developmentfrom
ci/migrate-to-org-workflow
Sep 1, 2026
Merged

eliotmcintire merged 12 commits into
developmentfrom
ci/migrate-to-org-workflow

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Replaces this repo's hand-rolled matrix with a thin caller on PredictiveEcology/actions/.github/workflows/R-CMD-check.yaml@main.

157 → 37 lines. Across both workflows touched here: +38 / −181.

Why

Third-party action versions, system dependencies, caching and the check itself were maintained separately in 17 repos. This repo was on actions/checkout@v4; the org spread was v2/v4/v5/v6/v7. Node 20 deprecation warnings are the current symptom. Consolidated, bumping it once in actions updates every repo.

Customizations preserved

oldrel-2 on both OSes, via extra-config (the org default matrix is 8 legs; these two are deliberate back-compat coverage). The hand-rolled pandoc retries, library cache and dependency retry are now the reusable workflow's job.

dependencies: "hard" dropped — DESCRIPTION is now the single source of truth

The old workflow set dependencies: '"hard"' and then hand-listed 16 Suggests in extra-packages, to work around a pak solver bug:

the combined Depends+Imports+Suggests dep graph trips pak's solver over an inconsistent Matrix entry (R>=4.7 from the /src/contrib/4.7.0/Recommended path coexisting with R>=4.4 from the main /src/contrib path). The conflict only materialises when Suggests is traversed transitively.

That depended on CRAN's metadata layout at a moment in time, so it was retested in #37 — branched from this PR so resolution mode was the only variable. 12/12 green: every platform, every R version including devel, plus the nosuggests leg.

So '"all"' now installs Suggests straight from DESCRIPTION and the extra-packages list is gone. The workaround is documented in-place, with the symptom to watch for, so it can be reapplied rather than rediscovered if CRAN's metadata regresses.

This also removes a live drift class. The hand-maintained list had already gone stale against DESCRIPTION: cowplot was still listed after being promoted to Imports in 7b5afe5, and curl was missing despite being a Suggests — and curl is load-bearing, since the LCC vignette's reachability probe is gated on requireNamespace("curl") and silently degrades to "skip" without it. There is now nothing to keep in sync.

Applied to test-coverage.yaml too. It set '"hard"' independently, with a comment deferring to R-CMD-check.yaml for a rationale this PR deletes — so leaving it would have kept the workaround alive pointing at a missing explanation.

NLMR removed, not migrated

An earlier revision carried NLMR=?ignore and the pak::pkg_install("ropensci/NLMR") post-install across, on the grounds of preserving existing behaviour. That was wrong: NLMR is not referenced anywhere in this package — not in DESCRIPTION, R/, vignettes/, tests/ or man/. Its only appearances were the two workflows installing it from GitHub on every leg.

This is the dead weight the PE CI standards call out from SpaDES, where ropensci/NLMR and s-u/fastshp were installed on every pkgdown build while referenced nowhere — the slowest step and the largest failure surface. Removed from both workflows.

Dropped deliberately

The bespoke Restore R library cache step — setup-r-dependencies caching replaces it. Worth watching the first run if that cache was load-bearing.

Note on the earlier red

The failures on this PR before 2026-09-01 were not caused by the migration. They were Deriv 4.3.0 failing to compile on R 4.4.x (fixed in #36 by dropping ggpubr) and the LCC vignette's ~2.7 GB of build-time downloads truncating (fixed in #35 by using pre-cropped fixtures). Both are on development and merged in here, so current runs test the migration itself. It went 12/12 green before the "hard" change above.

New coverage worth knowing about: the org workflow adds a release, nosuggests leg (_R_CHECK_DEPENDS_ONLY_=true) this repo did not have. It passes — the package checks clean without its Suggests.

Depends on PredictiveEcology/actions#27 (per-leg extra-env).

🤖 Generated with Claude Code

https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa

achubaty and others added 7 commits September 14, 2020 17:30
All changes have been used in FireSenseTesting for some time; time to merge
Firesense_LCC_flammability downloads from ftp.maps.canada.ca (LCC) and
cwfis.cfs.nrcan.gc.ca (fire polygons) at build time. R-CMD-check runners
routinely can't reach these, failing the vignette build with
"Failed to connect to ... port 443". Probe both servers up front and skip
the live download/analysis chunks when either is unreachable, degrading to
documentation-only (same as the existing macOS/archive path). Adds curl to
Suggests for the reachability probe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces this repo's hand-rolled matrix with a thin caller, so third-party
action versions, system dependencies, caching and the check itself are
maintained in one place instead of 17. Bumping actions/checkout there now
updates every repo at once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa
eliotmcintire and others added 2 commits August 31, 2026 17:09
The org concurrency budget is shared across every PredictiveEcology repo and is
the binding constraint on getting work through. These legs added R versions
below the default matrix; testing older R is explicitly not worth the runner
contention it causes.

oldrel-N is relative, so the default matrix's floor still rises on its own with
each R release -- no standing commitment to any particular old version.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa
eliotmcintire and others added 2 commits September 1, 2026 14:56
NLMR is not referenced anywhere in this package -- not in DESCRIPTION, R/,
vignettes/, tests/ or man/. Its only appearances were the two CI workflows,
which installed it from GitHub on every leg:

    NLMR=?ignore
    post-install: pak::pkg_install("ropensci/NLMR")

That is the same dead weight the PE CI standards call out from SpaDES, where
ropensci/NLMR and s-u/fastshp were installed on every pkgdown build while
being referenced nowhere -- the slowest step and the largest failure surface.
Removed from both R-CMD-check.yaml and test-coverage.yaml (this PR migrates
only the former, but the install was equally unused in the latter, and "remove
it entirely" means both).

Also sync extra-packages to the current Suggests:

- drop cowplot: promoted to Imports in 7b5afe5, so it now installs as a hard
  dependency and does not belong in extra-packages.
- add curl: a real Suggests, and the LCC vignette's reachability probe is
  gated on requireNamespace("curl") -- without it the probe silently degrades
  to "skip" rather than testing anything.

Both files parse as valid YAML.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3NTQTNStSLZ3mA3CsLcon
The `dependencies: '"hard"'` setting plus 16 hand-listed Suggests worked
around a pak solver bug: an inconsistent Matrix entry (R>=4.7 from
/src/contrib/4.7.0/Recommended coexisting with R>=4.4 from the main
/src/contrib path) that only surfaced when Suggests was traversed
transitively. Hard-deps-only resolved, and the Suggests were re-added by hand.

That failure depended on CRAN's metadata layout at a point in time. Retested
in #37 (branched from this one, so the only variable was resolution mode):
`dependencies: '"all"'` with no extra-packages list came back 12/12 green --
every platform, every R version including devel, and the nosuggests leg. The
metadata that caused it has moved on.

- R-CMD-check.yaml: '"hard"' -> '"all"', extra-packages list removed (16
  entries, which duplicated DESCRIPTION's Suggests exactly). any::rcmdcheck
  is supplied by the reusable workflow.
- test-coverage.yaml: same change. Its comment deferred to R-CMD-check.yaml
  for a rationale this migration would have deleted, and its mirrored-Suggests
  note no longer applied.

This removes the drift class that bit earlier today: the list had gone stale
against DESCRIPTION (cowplot promoted to Imports in 7b5afe5 and still listed;
curl a Suggests and missing, which silently degraded the LCC vignette's
reachability probe to "skip"). There is now nothing to keep in sync.

The workaround is documented in-place, so if a pak resolve error naming
Matrix ever returns, the fix is recorded rather than rediscovered.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3NTQTNStSLZ3mA3CsLcon
@eliotmcintire
eliotmcintire merged commit 2b8d800 into development Sep 1, 2026
12 checks passed
@eliotmcintire
eliotmcintire deleted the ci/migrate-to-org-workflow branch September 1, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants