Update GitHub Actions versions and PR file logic#346
Open
karangattu wants to merge 12 commits intomainfrom
Open
Update GitHub Actions versions and PR file logic#346karangattu wants to merge 12 commits intomainfrom
karangattu wants to merge 12 commits intomainfrom
Conversation
Bump workflow actions: replace actions/checkout@v4 with @v6 across multiple workflows, upgrade actions/setup-java@v3 to @v5, and actions/github-script@v6 to @v8. Replace Ana06/get-changed-files steps with a gh api paginated call that collects PR file names (writes JSON to GITHUB_OUTPUT) and adds GH_TOKEN/env + bash execution. These changes modernize CI actions and improve reliability of PR file collection.
Update two GitHub Actions workflows to use the GH CLI compare API (base...head) to gather changed filenames instead of calling the pulls files endpoint with pagination. Changed .github/workflows/apps-test-os.yml and .github/workflows/apps-test-precheck.yml to use `repos/<repo>/compare/<base>...<head> --jq '[.files[].filename]'`, producing a consistent list of modified files for the workflows.
Make git config --local --unset http.https://github.com/.extraheader tolerant by appending || true in three GitHub workflow files (.github/workflows/apps-test-os.yml, build-results.yml, trim-old-branches.yml). This prevents workflow steps from failing if the extraheader key is not present. Also adjust command grouping so git config --local --list runs on its own line where applicable.
Use apps_folder directly when constructing the find command to delete empty directories instead of file.path(repo_dir, apps_folder). This fixes incorrect path construction when building the system command and ensures the cleanup runs against the intended folder.
Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24="true" to several GitHub workflow files (R-CMD-check.yaml, apps-test-matrix.yml, apps-test-os.yml, apps-test-precheck.yml, build-results.yml) to force JavaScript actions to run on Node 24. Also update cache-version from "13" to "14" in .github/workflows/apps-config.yml to align the dependency cache version. These changes ensure consistent Node runtime for JS actions and refresh the cache version used by workflows.
Update the default cache-version in .github/workflows/apps-config.yml from "14" to "15" so the workflow pulls the newer library cache. This aligns the workflow's cache key with the updated environment/dependencies.
Update .github/internal/install-shinyverse/action.yaml to change the pak-version input from "devel" to "stable". This ensures the action uses the stable pak release instead of the development channel, improving build reproducibility and reducing instability from dev builds.
Introduce remap_pkg_refs to combine existing archived-package remaps with macOS-oldrel CRAN overrides (via macos_oldrel_cran_pkg_refs). Use CRAN releases for packages that have unstable dev versions on older macOS R, keep a backward-compatible remap_archived_pkgs wrapper, and update install path to use the new remapping. Add tests to verify remapping behavior for older/newer macOS R and that archived-package remaps are preserved.
Add install_macos_oldrel_cran_pkgs() to pin and install macOS oldrel CRAN package refs via install_pkgs_with_callr, marking them in the installed_pkgs cache. Update install_missing_pkgs() to skip packages already present in the libpath (using is_installed) and to invoke the new macOS pin installer before installing remaining packages. Tests: add clear_installed_pkg_cache helper and two tests to verify that installed packages are skipped and that macOS oldrel CRAN pins are installed prior to the remaining packages.
Rename and generalize macOS old-release CRAN pin helpers, add additional pinned package refs, and update installation logic and tests accordingly. macos_oldrel_cran_pkg_refs was renamed to macos_oldrel_pkg_refs and its comment updated to reflect alternative r-universe/source refs; new pins added (bsicons, crosstalk, shinyjster) and htmltools/later remain pinned to CRAN. install_macos_oldrel_cran_pkgs was renamed to install_macos_oldrel_pinned_pkgs and callers adjusted. Tests in test-install-remaps.R were updated to expect the new remappings and to mock the new helper and install behavior.
Workaround malformed r-universe source DESCRIPTIONs on macOS with R < 4.3.0 by: adding is_macos_oldrel(), making shinyverse_repos_option omit the r-universe repo on old macOS R, and routing shinyverse packages to GitHub refs (with specific CRAN pins for htmltools and later). Also ensure shinycoreci is not remapped. Update tests to cover repo exclusion, remapping behavior, pinned-package installation ordering, and additional package remapping expectations.
Update install.R and add a large set of new test snapshots under inst/apps/*/tests/testthat/_snaps for multiple example apps and platforms (windows, mac, linux) and R versions. Snapshots include .png, .json, and .html files created by recent test runs to refresh expected outputs; no other functional code changes were made.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump workflow actions: replace actions/checkout@v4 with @v6 across multiple workflows, upgrade actions/setup-java@v3 to @v5, and actions/github-script@v6 to @v8. Replace Ana06/get-changed-files steps with a gh api paginated call that collects PR file names (writes JSON to GITHUB_OUTPUT) and adds GH_TOKEN/env + bash execution. These changes modernize CI actions and improve reliability of PR file collection.
The issue is that actions/checkout@v6 no longer sets the http.https://github.com/.extraheader git config. The git config --unset for a non-existent key returns exit code 5, and because the commands were chained with &&, it failed the entire step.
Fixed all 3 affected files by adding || true so the unset gracefully handles missing keys:
The error is git config --local --unset http.https://github.com/.extraheader — exit code 5 means the key doesn't exist. With actions/checkout@v6, this header is no longer set, so the unset command fails and (because of && chaining) takes down the whole step.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" will be removed once https://github.com/rstudio/shiny-workflows is me is merged