From 082bf62330a5345f50af31d7533f7c620c4747bd Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Wed, 10 Jul 2024 08:24:46 -0400 Subject: [PATCH 01/26] Update _pkgdown.yml --- _pkgdown.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index a8ce03928..6d062d5d5 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -71,7 +71,6 @@ navbar: - articles - tutorials - news - right: github components: options: text: Options From 3f6aea2f4b4d38a71259f4f8e37c7baff7781ad8 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sun, 21 Jul 2024 01:53:52 +0000 Subject: [PATCH 02/26] Bump version to 1.9.0.9016 --- DESCRIPTION | 2 +- NEWS.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index ac5f0b66a..aae61883a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9015 +Version: 1.9.0.9016 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index ebf96b1ae..0fa305598 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ +# pillar 1.9.0.9016 + +## Documentation + +- Update \_pkgdown.yml to bring back search bar (@olivroy, #667). + + # pillar 1.9.0.9015 ## Testing From d6937c665254b51dd265c48c04b11d2ce0228588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 1 Aug 2024 16:17:24 +0200 Subject: [PATCH 03/26] ci: Use dev roxygen2 and decor --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index baf5c5633..df777904f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -51,7 +51,7 @@ jobs: install-r: false cache-version: rcc-smoke-2 needs: check - extra-packages: any::rcmdcheck any::roxygen2 r-lib/styler + extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' From 94b4916d842f008c4d4a81397747f6014a1d8685 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Thu, 1 Aug 2024 14:24:10 +0000 Subject: [PATCH 04/26] chore: Auto-update from GitHub Actions Run: https://github.com/r-lib/pillar/actions/runs/10200114378 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index aae61883a..737b7989e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -52,7 +52,7 @@ VignetteBuilder: knitr Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.2.9000 Config/testthat/edition: 3 Config/testthat/parallel: true Config/testthat/start-first: From 40b7d2521b008c76feed2b9c1397bdded6b86383 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Fri, 2 Aug 2024 01:45:43 +0000 Subject: [PATCH 05/26] Bump version to 1.9.0.9017 --- DESCRIPTION | 2 +- NEWS.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 737b7989e..08a7a43fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9016 +Version: 1.9.0.9017 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index 0fa305598..a49db81a5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,18 @@ +# pillar 1.9.0.9017 + +## Chore + +- Auto-update from GitHub Actions. + + Run: https://github.com/r-lib/pillar/actions/runs/10200114378 + +## Continuous integration + +- Use dev roxygen2 and decor. + + # pillar 1.9.0.9016 ## Documentation From 6da81302e034504489402e0b8a0f9029cdcb36c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Fri, 2 Aug 2024 05:38:19 +0200 Subject: [PATCH 06/26] ci: Refactor dep-suggests-matrix, avoid killing base and recommended packages --- .github/dep-suggests-matrix.json | 1 + .github/workflows/R-CMD-check.yaml | 5 +- .../workflows/dep-matrix-suggests/action.yml | 56 ------------------- .../dep-suggests-matrix-read/action.yml | 21 +++++++ .../workflows/dep-suggests-matrix/action.R | 42 ++++++++++++++ .../workflows/dep-suggests-matrix/action.yml | 13 +++++ 6 files changed, 81 insertions(+), 57 deletions(-) create mode 100644 .github/dep-suggests-matrix.json delete mode 100644 .github/workflows/dep-matrix-suggests/action.yml create mode 100644 .github/workflows/dep-suggests-matrix-read/action.yml create mode 100644 .github/workflows/dep-suggests-matrix/action.R create mode 100644 .github/workflows/dep-suggests-matrix/action.yml diff --git a/.github/dep-suggests-matrix.json b/.github/dep-suggests-matrix.json new file mode 100644 index 000000000..3cc98e25f --- /dev/null +++ b/.github/dep-suggests-matrix.json @@ -0,0 +1 @@ +{"package":["bit64","DBI","debugme","DiagrammeR","dplyr","formattable","ggplot2","lubridate","nanotime","nycflights13","palmerpenguins","scales","stringi","units","vdiffr"]} diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index df777904f..c0966d1f2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -59,6 +59,9 @@ jobs: - uses: ./.github/workflows/versions-matrix if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + - uses: ./.github/workflows/dep-suggests-matrix + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + - uses: ./.github/workflows/update-snapshots if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository @@ -212,7 +215,7 @@ jobs: use-public-rspm: true - id: set-matrix - uses: ./.github/workflows/dep-matrix-suggests + uses: ./.github/workflows/dep-suggests-matrix-read check-suggests-matrix: runs-on: ubuntu-22.04 diff --git a/.github/workflows/dep-matrix-suggests/action.yml b/.github/workflows/dep-matrix-suggests/action.yml deleted file mode 100644 index deafab932..000000000 --- a/.github/workflows/dep-matrix-suggests/action.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: "Actions to compute a matrix with all suggested packages" -outputs: - matrix: - description: "Generated matrix" - value: ${{ steps.set-matrix.outputs.matrix }} - -runs: - using: "composite" - steps: - - id: set-matrix - run: | - get_deps <- function() { - # Determine package dependencies - if (!requireNamespace("desc", quietly = TRUE)) { - install.packages("desc") - } - - deps_df <- desc::desc_get_deps() - deps_df_optional <- deps_df$package[deps_df$type %in% c("Suggests", "Enhances")] - deps_df_hard <- deps_df$package[deps_df$type %in% c("Depends", "Imports", "LinkingTo")] - - packages <- sort(deps_df_optional) - packages <- intersect(packages, rownames(available.packages())) - - # Too big to fail, or can't be avoided: - off_limits <- c("testthat", "rmarkdown", "rcmdcheck", deps_df_hard) - off_limits_dep <- unlist(tools::package_dependencies(off_limits, recursive = TRUE, which = "strong")) - setdiff(packages, c(off_limits, off_limits_dep)) - } - - if (Sys.getenv("GITHUB_BASE_REF") != "") { - print(Sys.getenv("GITHUB_BASE_REF")) - has_diff <- (system("git diff ${{ github.event.pull_request.base.sha }}... | egrep '^[+][^+]' | grep -q ::") == 0) - if (has_diff) { - system("git diff ${{ github.event.pull_request.base.sha }}... | egrep '^[+][^+]' | grep -q ::") - packages <- get_deps() - } else { - writeLines("No changes using :: found, not checking without suggested packages") - packages <- character() - } - } else { - packages <- get_deps() - } - - if (length(packages) > 0) { - json <- paste0( - '{"package":[', - paste0('"', packages, '"', collapse = ","), - ']}' - ) - writeLines(json) - writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT")) - } else { - writeLines("Package list empty!") - } - shell: Rscript {0} diff --git a/.github/workflows/dep-suggests-matrix-read/action.yml b/.github/workflows/dep-suggests-matrix-read/action.yml new file mode 100644 index 000000000..b1a8ed0d3 --- /dev/null +++ b/.github/workflows/dep-suggests-matrix-read/action.yml @@ -0,0 +1,21 @@ +name: "Actions to read a matrix with all suggested packages, computed with the dep-suggests-matrix action" +outputs: + matrix: + description: "Generated matrix" + value: ${{ steps.set-matrix.outputs.matrix }} + +runs: + using: "composite" + steps: + - name: Install json2yaml + run: | + sudo npm install -g json2yaml + shell: bash + + - id: set-matrix + run: | + matrix=$(cat .github/dep-suggests-matrix.json || echo '{"package":[]}') + echo $matrix | jq . + echo $matrix | json2yaml + echo "matrix=$matrix" | tee -a $GITHUB_OUTPUT + shell: bash diff --git a/.github/workflows/dep-suggests-matrix/action.R b/.github/workflows/dep-suggests-matrix/action.R new file mode 100644 index 000000000..c6a08a5b0 --- /dev/null +++ b/.github/workflows/dep-suggests-matrix/action.R @@ -0,0 +1,42 @@ +# FIXME: Dynamic lookup by parsing https://svn.r-project.org/R/tags/ +get_deps <- function() { + # Determine package dependencies + if (!requireNamespace("desc", quietly = TRUE)) { + install.packages("desc") + } + + deps_df <- desc::desc_get_deps() + deps_df_optional <- deps_df$package[deps_df$type %in% c("Suggests", "Enhances")] + deps_df_hard <- deps_df$package[deps_df$type %in% c("Depends", "Imports", "LinkingTo")] + deps_df_base <- unlist(tools::standard_package_names(), use.names = FALSE) + + packages <- sort(deps_df_optional) + packages <- intersect(packages, rownames(available.packages())) + + # Too big to fail, or can't be avoided: + off_limits <- c("testthat", "rmarkdown", "rcmdcheck", deps_df_hard, deps_df_base) + off_limits_dep <- unlist(tools::package_dependencies(off_limits, recursive = TRUE, which = "strong")) + setdiff(packages, c(off_limits, off_limits_dep)) +} + +if (Sys.getenv("GITHUB_BASE_REF") != "") { + print(Sys.getenv("GITHUB_BASE_REF")) + has_diff <- (system("git diff ${{ github.event.pull_request.base.sha }}... | egrep '^[+][^+]' | grep -q ::") == 0) + if (has_diff) { + system("git diff ${{ github.event.pull_request.base.sha }}... | egrep '^[+][^+]' | grep -q ::") + packages <- get_deps() + } else { + writeLines("No changes using :: found, not checking without suggested packages") + packages <- character() + } +} else { + packages <- get_deps() +} + +json <- paste0( + '{"package":[', + if (length(packages) > 0) paste0('"', packages, '"', collapse = ","), + ']}' +) +writeLines(json, ".github/dep-suggests-matrix.json") +writeLines(json) diff --git a/.github/workflows/dep-suggests-matrix/action.yml b/.github/workflows/dep-suggests-matrix/action.yml new file mode 100644 index 000000000..0f5e64951 --- /dev/null +++ b/.github/workflows/dep-suggests-matrix/action.yml @@ -0,0 +1,13 @@ +name: "Actions to compute a matrix with all suggested packages" +outputs: + matrix: + description: "Generated matrix" + value: ${{ steps.set-matrix.outputs.matrix }} + +runs: + using: "composite" + steps: + - id: set-matrix + run: | + Rscript ./.github/workflows/dep-suggests-matrix/action.R + shell: bash From f18ae94ac2c63d8375608dc2d25b6e337b12a4e0 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sat, 3 Aug 2024 01:40:25 +0000 Subject: [PATCH 07/26] chore: Auto-update from GitHub Actions Run: https://github.com/r-lib/pillar/actions/runs/10224241696 --- man/ctl_new_pillar.Rd | 2 +- man/ctl_new_pillar_list.Rd | 2 +- man/glimpse.Rd | 2 +- man/tbl_format_body.Rd | 2 +- man/tbl_format_footer.Rd | 2 +- man/tbl_format_header.Rd | 2 +- man/tbl_format_setup.Rd | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/man/ctl_new_pillar.Rd b/man/ctl_new_pillar.Rd index c80660971..f4c27d33b 100644 --- a/man/ctl_new_pillar.Rd +++ b/man/ctl_new_pillar.Rd @@ -49,7 +49,7 @@ Implementations should return \code{NULL} if none of the data fits the available width. } \examples{ -\dontshow{if (rlang::is_installed("palmerpenguins") && requireNamespace("tibble")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("palmerpenguins") && requireNamespace("tibble")) withAutoprint(\{ # examplesIf} # Create pillar objects ctl_new_pillar( palmerpenguins::penguins, diff --git a/man/ctl_new_pillar_list.Rd b/man/ctl_new_pillar_list.Rd index e7464f088..bfa947db3 100644 --- a/man/ctl_new_pillar_list.Rd +++ b/man/ctl_new_pillar_list.Rd @@ -65,7 +65,7 @@ and with \code{first_pillar} set to the pillar object constructed in the first call. } \examples{ -\dontshow{if (rlang::is_installed("palmerpenguins") && requireNamespace("tibble")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("palmerpenguins") && requireNamespace("tibble")) withAutoprint(\{ # examplesIf} # Simple column ctl_new_pillar_list( tibble::tibble(), diff --git a/man/glimpse.Rd b/man/glimpse.Rd index e5f306f11..0cce4e27c 100644 --- a/man/glimpse.Rd +++ b/man/glimpse.Rd @@ -39,7 +39,7 @@ See \code{\link[=format_glimpse]{format_glimpse()}} for details on the formattin \examples{ glimpse(mtcars) -\dontshow{if (rlang::is_installed("nycflights13")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("nycflights13")) withAutoprint(\{ # examplesIf} glimpse(nycflights13::flights) \dontshow{\}) # examplesIf} } diff --git a/man/tbl_format_body.Rd b/man/tbl_format_body.Rd index 46b0a58ea..c5f890482 100644 --- a/man/tbl_format_body.Rd +++ b/man/tbl_format_body.Rd @@ -30,7 +30,7 @@ If you only need to change the appearance of a single data type, override \code{\link[vctrs:vec_ptype_full]{vctrs::vec_ptype_abbr()}} and \code{\link[=pillar_shaft]{pillar_shaft()}} for this data type. } \examples{ -\dontshow{if (rlang::is_installed("palmerpenguins")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("palmerpenguins")) withAutoprint(\{ # examplesIf} setup <- tbl_format_setup(palmerpenguins::penguins) tbl_format_body(palmerpenguins::penguins, setup) diff --git a/man/tbl_format_footer.Rd b/man/tbl_format_footer.Rd index d2230e4fe..51d1e9263 100644 --- a/man/tbl_format_footer.Rd +++ b/man/tbl_format_footer.Rd @@ -30,7 +30,7 @@ The default implementation adds information about rows and columns that are not shown in the body. } \examples{ -\dontshow{if (rlang::is_installed("palmerpenguins")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("palmerpenguins")) withAutoprint(\{ # examplesIf} setup <- tbl_format_setup(palmerpenguins::penguins) tbl_format_footer(palmerpenguins::penguins, setup) diff --git a/man/tbl_format_header.Rd b/man/tbl_format_header.Rd index 0d980c730..43fcf2b19 100644 --- a/man/tbl_format_header.Rd +++ b/man/tbl_format_header.Rd @@ -31,7 +31,7 @@ override or extend \code{\link[=tbl_sum]{tbl_sum()}} for your class which is cal default method. } \examples{ -\dontshow{if (rlang::is_installed("palmerpenguins")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("palmerpenguins")) withAutoprint(\{ # examplesIf} setup <- tbl_format_setup(palmerpenguins::penguins) tbl_format_header(palmerpenguins::penguins, setup) diff --git a/man/tbl_format_setup.Rd b/man/tbl_format_setup.Rd index cd73667ed..2af0f4f3b 100644 --- a/man/tbl_format_setup.Rd +++ b/man/tbl_format_setup.Rd @@ -86,7 +86,7 @@ standard printing for tibbles. See \code{\link[=new_tbl_format_setup]{new_tbl_format_setup()}} for details on the returned object. } \examples{ -\dontshow{if (rlang::is_installed("palmerpenguins")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +\dontshow{if (rlang::is_installed("palmerpenguins")) withAutoprint(\{ # examplesIf} tbl_format_setup(palmerpenguins::penguins) \dontshow{\}) # examplesIf} } From e6f75b17dd57d9ba200065ab07fcf33f1c926584 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sat, 3 Aug 2024 01:47:47 +0000 Subject: [PATCH 08/26] Bump version to 1.9.0.9018 --- DESCRIPTION | 2 +- NEWS.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 08a7a43fc..cafe75d47 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9017 +Version: 1.9.0.9018 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index a49db81a5..19f3c73a2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,18 @@ +# pillar 1.9.0.9018 + +## Chore + +- Auto-update from GitHub Actions. + + Run: https://github.com/r-lib/pillar/actions/runs/10224241696 + +## Continuous integration + +- Refactor dep-suggests-matrix, avoid killing base and recommended packages. + + # pillar 1.9.0.9017 ## Chore From 6f4b526ff0674dac1a8fdef8c369931f63443955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Mon, 5 Aug 2024 22:42:43 +0200 Subject: [PATCH 09/26] ci: Inline action --- .github/workflows/get-extra/action.yml | 16 ---------------- .github/workflows/install/action.yml | 6 +++++- 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/get-extra/action.yml diff --git a/.github/workflows/get-extra/action.yml b/.github/workflows/get-extra/action.yml deleted file mode 100644 index 84c56d9b7..000000000 --- a/.github/workflows/get-extra/action.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Action to determine extra packages to be installed" -outputs: - packages: - description: "List of extra packages" - value: ${{ steps.get-extra.outputs.packages }} - -runs: - using: "composite" - steps: - - name: Get extra packages - id: get-extra - run: | - set -x - packages=$( ( grep Config/gha/extra-packages DESCRIPTION || true ) | cut -d " " -f 2) - echo packages=$packages >> $GITHUB_OUTPUT - shell: bash diff --git a/.github/workflows/install/action.yml b/.github/workflows/install/action.yml index cf9eda067..702aedabd 100644 --- a/.github/workflows/install/action.yml +++ b/.github/workflows/install/action.yml @@ -82,7 +82,11 @@ runs: use-public-rspm: true - id: get-extra - uses: ./.github/workflows/get-extra + run: | + set -x + packages=$( ( grep Config/gha/extra-packages DESCRIPTION || true ) | cut -d " " -f 2) + echo packages=$packages >> $GITHUB_OUTPUT + shell: bash - uses: r-lib/actions/setup-r-dependencies@v2 env: From 0a6c53ecb3736c96ec03d4c396c90a8d76a29cd1 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Tue, 6 Aug 2024 01:45:48 +0000 Subject: [PATCH 10/26] Bump version to 1.9.0.9019 --- DESCRIPTION | 2 +- NEWS.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index cafe75d47..6b7dcb1c4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9018 +Version: 1.9.0.9019 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index 19f3c73a2..871aeae11 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ +# pillar 1.9.0.9019 + +## Continuous integration + +- Inline action. + + # pillar 1.9.0.9018 ## Chore From 6d4c3c7cfe98991cbaf300b10858181dfff2be7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 10 Aug 2024 00:48:20 +0200 Subject: [PATCH 11/26] ci: Use v2 instead of master --- .github/workflows/R-CMD-check.yaml | 2 +- .github/workflows/pkgdown.yaml | 2 +- .github/workflows/pr-commands.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index c0966d1f2..172026f43 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# 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 # # NOTE: This workflow is overkill for most R packages and diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 740004087..de69b1494 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Also included in R-CMD-check.yaml, this workflow only listens to pushes to branches # that start with "docs*" on: diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml index 3ce95aaf2..a11f4d390 100644 --- a/.github/workflows/pr-commands.yaml +++ b/.github/workflows/pr-commands.yaml @@ -12,10 +12,10 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 - - uses: r-lib/actions/pr-fetch@master + - uses: r-lib/actions/pr-fetch@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 with: install-r: false - name: Configure Git identity @@ -39,7 +39,7 @@ jobs: git add man/ NAMESPACE git commit -m 'Document' fi - - uses: r-lib/actions/pr-push@master + - uses: r-lib/actions/pr-push@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} style: @@ -51,10 +51,10 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v4 - - uses: r-lib/actions/pr-fetch@master + - uses: r-lib/actions/pr-fetch@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 with: install-r: false - name: Configure Git identity @@ -77,7 +77,7 @@ jobs: git add '*.R' '*.Rmd' git commit -m 'Style' fi - - uses: r-lib/actions/pr-push@master + - uses: r-lib/actions/pr-push@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} merge: From 92ef8012de8ee1438348076847e9587401917d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 10 Aug 2024 03:06:57 +0200 Subject: [PATCH 12/26] ci: Fix edge case of no suggested packages --- .../workflows/dep-suggests-matrix-read/action.yml | 9 ++++++--- .github/workflows/dep-suggests-matrix/action.R | 15 ++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dep-suggests-matrix-read/action.yml b/.github/workflows/dep-suggests-matrix-read/action.yml index b1a8ed0d3..39e7a7b23 100644 --- a/.github/workflows/dep-suggests-matrix-read/action.yml +++ b/.github/workflows/dep-suggests-matrix-read/action.yml @@ -14,8 +14,11 @@ runs: - id: set-matrix run: | - matrix=$(cat .github/dep-suggests-matrix.json || echo '{"package":[]}') - echo $matrix | jq . - echo $matrix | json2yaml + # Empty contents if no suggested packages + matrix=$(cat .github/dep-suggests-matrix.json || true) + if [ -n "$matrix" ]; then + echo $matrix | jq . + echo $matrix | json2yaml + fi echo "matrix=$matrix" | tee -a $GITHUB_OUTPUT shell: bash diff --git a/.github/workflows/dep-suggests-matrix/action.R b/.github/workflows/dep-suggests-matrix/action.R index c6a08a5b0..139519403 100644 --- a/.github/workflows/dep-suggests-matrix/action.R +++ b/.github/workflows/dep-suggests-matrix/action.R @@ -33,10 +33,15 @@ if (Sys.getenv("GITHUB_BASE_REF") != "") { packages <- get_deps() } -json <- paste0( - '{"package":[', - if (length(packages) > 0) paste0('"', packages, '"', collapse = ","), - ']}' -) +if (length(packages) > 0) { + json <- paste0( + '{"package":[', + paste0('"', packages, '"', collapse = ","), + ']}' + ) +} else { + json <- character() +} + writeLines(json, ".github/dep-suggests-matrix.json") writeLines(json) From d72651cb925a6c683050632702734e94b94ce530 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sat, 10 Aug 2024 01:48:27 +0000 Subject: [PATCH 13/26] Bump version to 1.9.0.9020 --- DESCRIPTION | 2 +- NEWS.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6b7dcb1c4..c043f93b6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9019 +Version: 1.9.0.9020 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index 871aeae11..7cc8b370c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,14 @@ +# pillar 1.9.0.9020 + +## Continuous integration + +- Fix edge case of no suggested packages. + +- Use v2 instead of master. + + # pillar 1.9.0.9019 ## Continuous integration From cb6f2cfc29293771b91d07db8c0289a853138292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Fri, 16 Aug 2024 21:50:12 +0200 Subject: [PATCH 14/26] ci: Sync with latest developments --- .github/workflows/R-CMD-check-dev.yaml | 4 +- .github/workflows/R-CMD-check.yaml | 17 +++++++- .github/workflows/commit/action.yml | 50 +++++++++++++++++----- .github/workflows/revdep.yaml | 2 +- .github/workflows/update-status/action.yml | 19 +++++--- 5 files changed, 69 insertions(+), 23 deletions(-) diff --git a/.github/workflows/R-CMD-check-dev.yaml b/.github/workflows/R-CMD-check-dev.yaml index 9b00903cf..700486fc2 100644 --- a/.github/workflows/R-CMD-check-dev.yaml +++ b/.github/workflows/R-CMD-check-dev.yaml @@ -101,7 +101,7 @@ jobs: runs-on: ubuntu-22.04 - name: ${{ matrix.package }} + name: 'rcc-dev: ${{ matrix.package }}' # Begin custom: services # End custom: services @@ -147,4 +147,4 @@ jobs: - uses: ./.github/workflows/check with: - results: ${{ matrix.package }} \ No newline at end of file + results: ${{ matrix.package }} diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 172026f43..5c685f598 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -13,11 +13,20 @@ on: branches: - main - master + workflow_dispatch: + inputs: + ref: + description: "Branch or tag to check out" + required: false + default: "main" + merge_group: + types: + - checks_requested schedule: - cron: "10 0 * * *" concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.ref || github.head_ref || github.sha }}-${{ github.base_ref || '' }} cancel-in-progress: true name: rcc @@ -35,6 +44,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - uses: ./.github/workflows/rate-limit with: @@ -74,6 +85,8 @@ jobs: - id: commit if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository uses: ./.github/workflows/commit + with: + token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/workflows/check with: @@ -154,7 +167,7 @@ jobs: runs-on: ${{ matrix.os }} - name: ${{ matrix.os }} (${{ matrix.r }}) ${{ matrix.desc }} + name: 'rcc: ${{ matrix.os }} (${{ matrix.r }}) ${{ matrix.desc }}' # Begin custom: services # End custom: services diff --git a/.github/workflows/commit/action.yml b/.github/workflows/commit/action.yml index bd375d3dd..d5049bc56 100644 --- a/.github/workflows/commit/action.yml +++ b/.github/workflows/commit/action.yml @@ -1,4 +1,8 @@ name: "Action to commit changes to the repository" +inputs: + token: + description: "GitHub token" + required: true outputs: sha: description: "SHA of generated commit" @@ -7,23 +11,47 @@ outputs: runs: using: "composite" steps: - - name: Commit if changed + - name: Commit if changed, create a PR if protected id: commit + env: + GITHUB_TOKEN: ${{ inputs.token }} run: | set -x if [ -n "$(git status --porcelain)" ]; then echo "Changed" - git fetch - if [ -n "${GITHUB_HEAD_REF}" ]; then + protected=${{ github.ref_protected }} + if [ "${protected}" = "true" ]; then + current_branch=$(git branch --show-current) + new_branch=gha-commit + git checkout -b ${new_branch} git add . - git stash save - git switch ${GITHUB_HEAD_REF} - git merge origin/${GITHUB_BASE_REF} --no-edit - git stash pop + git commit -m "chore: Auto-update from GitHub Actions"$'\n'$'\n'"Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + # Force-push, used in only one place + # Alternative: separate branch names for each usage + git push -u origin HEAD -f + + existing_pr=$(gh pr list --state open --base main --head ${new_branch} --json number --jq '.[] | .number') + if [ -n "${existing_pr}" ]; then + echo "Existing PR: ${existing_pr}" + else + gh pr create --base main --head ${new_branch} --title "chore: Auto-update from GitHub Actions" --body "Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + fi + + gh workflow run rcc -f ref=$(git rev-parse HEAD) + else + git fetch + if [ -n "${GITHUB_HEAD_REF}" ]; then + git add . + git stash save + git switch ${GITHUB_HEAD_REF} + git merge origin/${GITHUB_BASE_REF} --no-edit + git stash pop + fi + git add . + git commit -m "chore: Auto-update from GitHub Actions"$'\n'$'\n'"Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + git push -u origin HEAD fi - git add . - git commit -m "chore: Auto-update from GitHub Actions"$'\n'$'\n'"Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" - git push -u origin HEAD - echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT fi + # Unconditionally set the output because it could come from a manually triggered run + echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT shell: bash diff --git a/.github/workflows/revdep.yaml b/.github/workflows/revdep.yaml index 4a0d511ae..0fa67dce8 100644 --- a/.github/workflows/revdep.yaml +++ b/.github/workflows/revdep.yaml @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-22.04 - name: ${{ matrix.package }} + name: 'revdep: ${{ matrix.package }}' # Begin custom: services # End custom: services diff --git a/.github/workflows/update-status/action.yml b/.github/workflows/update-status/action.yml index 881217088..d9462fce3 100644 --- a/.github/workflows/update-status/action.yml +++ b/.github/workflows/update-status/action.yml @@ -4,9 +4,6 @@ inputs: sha: description: 'SHA to update' required: true - state: - description: 'state to update' - required: true runs: using: "composite" @@ -24,11 +21,19 @@ runs: -H "X-GitHub-Api-Version: 2022-11-28" \ repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .html_url) - gh api \ - --method POST \ + # Check if a failing status has been set already + status=$(gh api \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - repos/${{ github.repository }}/statuses/${{ inputs.sha }} \ - -f "state=${{ job.status }}" -f "target_url=$html_url" -f "description=${{ github.workflow }} / ${{ github.job }}" -f "context=actions-sync" + repos/${{ github.repository }}/commits/${{ inputs.sha }}/status | jq -r .state) + + if [ "${status}" != "error" ] && [ "${status}" != "failure" ]; then + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/statuses/${{ inputs.sha }} \ + -f "state=${{ job.status }}" -f "target_url=$html_url" -f "description=${{ github.workflow }} / ${{ github.job }}" -f "context=actions-sync" + fi fi shell: bash From 2ca3e32a897f9de8b3d9a86ef02531b2cd193827 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sat, 17 Aug 2024 01:47:30 +0000 Subject: [PATCH 15/26] Bump version to 1.9.0.9021 --- DESCRIPTION | 2 +- NEWS.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index c043f93b6..07da370f8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9020 +Version: 1.9.0.9021 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index 7cc8b370c..6ff34aabd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ +# pillar 1.9.0.9021 + +## Continuous integration + +- Sync with latest developments. + + # pillar 1.9.0.9020 ## Continuous integration From 81fe0eb684aa96eda1fbd9901f7a3f303ca7f4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 29 Aug 2024 21:28:09 +0200 Subject: [PATCH 16/26] ci: Improve support for protected branches, without fledge --- .github/workflows/R-CMD-check-status.yaml | 76 +++++++++ .github/workflows/R-CMD-check.yaml | 161 +++++------------- .github/workflows/commit/action.yml | 14 +- .../dep-suggests-matrix-read/action.yml | 24 --- .../workflows/dep-suggests-matrix/action.R | 14 +- .github/workflows/get-extra/action.yml | 16 ++ .github/workflows/matrix-check/action.yml | 23 +++ .github/workflows/pkgdown.yaml | 2 +- .github/workflows/update-status/action.yml | 39 ----- .../workflows/versions-matrix-read/action.yml | 21 --- .github/workflows/versions-matrix/action.R | 26 ++- .github/workflows/versions-matrix/action.yml | 10 ++ 12 files changed, 211 insertions(+), 215 deletions(-) create mode 100644 .github/workflows/R-CMD-check-status.yaml delete mode 100644 .github/workflows/dep-suggests-matrix-read/action.yml create mode 100644 .github/workflows/get-extra/action.yml create mode 100644 .github/workflows/matrix-check/action.yml delete mode 100644 .github/workflows/update-status/action.yml delete mode 100644 .github/workflows/versions-matrix-read/action.yml diff --git a/.github/workflows/R-CMD-check-status.yaml b/.github/workflows/R-CMD-check-status.yaml new file mode 100644 index 000000000..15860acbb --- /dev/null +++ b/.github/workflows/R-CMD-check-status.yaml @@ -0,0 +1,76 @@ +# Workflow to update the status of a commit for the R-CMD-check workflow +# Necessary because remote PRs cannot update the status of the commit +on: + workflow_run: + workflows: + - rcc + types: + - requested + - completed + +name: rcc-status + +jobs: + rcc-status: + runs-on: ubuntu-latest + + name: "Update commit status" + + # Only run if triggered by rcc workflow + if: github.event.workflow_run.name == 'rcc' + + steps: + - name: "Update commit status" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -x + + if [ "${{ github.event.workflow_run.status }}" == "completed" ]; then + if [ "${{ github.event.workflow_run.conclusion }}" == "success" ]; then + state="success" + else + state="failure" + fi + + # Read artifact ID + artifact_id=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts | jq -r '.artifacts[] | select(.name == "rcc-smoke-sha") | .id') + + if [ -n "${artifact_id}" ]; then + # Download artifact + curl -L -o rcc-smoke-sha.zip \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${GH_TOKEN}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${artifact_id}/zip + + # Unzip artifact + unzip rcc-smoke-sha.zip + + # Read artifact + sha=$(cat rcc-smoke-sha.txt) + + # Clean up + rm rcc-smoke-sha.zip rcc-smoke-sha.txt + fi + else + state="pending" + fi + + if [ -z "${sha}" ]; then + sha=${{ github.event.workflow_run.head_sha }} + fi + + html_url=${{ github.event.workflow_run.html_url }} + description=${{ github.event.workflow_run.name }} + + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/statuses/${sha} \ + -f "state=${state}" -f "target_url=${html_url}" -f "description=${description}" -f "context=rcc" + shell: bash diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 5c685f598..b622c4807 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -9,6 +9,8 @@ on: branches: - main - master + - release + - cran-* pull_request: branches: - main @@ -36,6 +38,8 @@ jobs: runs-on: ubuntu-latest outputs: sha: ${{ steps.commit.outputs.sha }} + versions-matrix: ${{ steps.versions-matrix.outputs.matrix }} + dep-suggests-matrix: ${{ steps.dep-suggests-matrix.outputs.matrix }} name: "Smoke test: stock R" @@ -59,31 +63,34 @@ jobs: - uses: ./.github/workflows/install with: token: ${{ secrets.GITHUB_TOKEN }} - install-r: false cache-version: rcc-smoke-2 - needs: check - extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler + needs: check, website + # Beware of using dev pkgdown here, has brought in dev dependencies in the past + extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler pkgdown - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' - - uses: ./.github/workflows/versions-matrix - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + - id: versions-matrix + # Only run for pull requests if the base repo is different from the head repo, always run for other events + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + uses: ./.github/workflows/versions-matrix - - uses: ./.github/workflows/dep-suggests-matrix - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + - id: dep-suggests-matrix + uses: ./.github/workflows/dep-suggests-matrix - uses: ./.github/workflows/update-snapshots - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository - uses: ./.github/workflows/style - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository - uses: ./.github/workflows/roxygenize - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + + - name: Remove config files from previous iteration + run: | + rm -f .github/dep-suggests-matrix.json .github/versions-matrix.json + shell: bash - id: commit - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository uses: ./.github/workflows/commit with: token: ${{ secrets.GITHUB_TOKEN }} @@ -92,81 +99,51 @@ jobs: with: results: ${{ runner.os }}-smoke-test - # Runs in a separate workflow, because it's using dev pkgdown - # which might bring in other dev dependencies - pkgdown: - needs: rcc-smoke - - runs-on: ubuntu-latest - - name: "pkgdown" - - # Begin custom: services - # End custom: services - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.rcc-smoke.outputs.sha }} - - - uses: ./.github/workflows/rate-limit - with: - token: ${{ secrets.GITHUB_TOKEN }} + - uses: ./.github/workflows/pkgdown-build + if: github.event_name != 'push' - - uses: ./.github/workflows/git-identity + - uses: ./.github/workflows/pkgdown-deploy if: github.event_name == 'push' - - uses: ./.github/workflows/custom/before-install - if: hashFiles('.github/workflows/custom/before-install/action.yml') != '' + # Upload sha as artifact + - run: | + echo -n "${{ steps.commit.outputs.sha }}" > rcc-smoke-sha.txt + shell: bash - - uses: ./.github/workflows/install + - uses: actions/upload-artifact@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} - install-r: false - cache-version: pkgdown-1 - needs: website - extra-packages: r-lib/pkgdown local::. - - - uses: ./.github/workflows/custom/after-install - if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' + name: rcc-smoke-sha + path: rcc-smoke-sha.txt - - uses: ./.github/workflows/pkgdown-build - if: github.event_name != 'push' - - - uses: ./.github/workflows/pkgdown-deploy - if: github.event_name == 'push' + rcc-smoke-check-matrix: + runs-on: ubuntu-latest - versions-matrix: - runs-on: ubuntu-22.04 - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} + name: "Check matrix" - name: Collect versions + needs: + - rcc-smoke steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + ref: ${{ needs.rcc-smoke.outputs.sha }} - - uses: ./.github/workflows/rate-limit + - uses: ./.github/workflows/matrix-check with: - token: ${{ secrets.GITHUB_TOKEN }} + matrix: ${{ needs.rcc-smoke.outputs.versions-matrix }} - - uses: r-lib/actions/setup-r@v2 + - uses: ./.github/workflows/matrix-check with: - install-r: false - use-public-rspm: true - - - id: set-matrix - uses: ./.github/workflows/versions-matrix-read + matrix: ${{ needs.rcc-smoke.outputs.dep-suggests-matrix }} rcc-full: needs: - rcc-smoke - - versions-matrix runs-on: ${{ matrix.os }} + if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' }} + name: 'rcc: ${{ matrix.os }} (${{ matrix.r }}) ${{ matrix.desc }}' # Begin custom: services @@ -174,7 +151,7 @@ jobs: strategy: fail-fast: false - matrix: ${{fromJson(needs.versions-matrix.outputs.matrix)}} + matrix: ${{fromJson(needs.rcc-smoke.outputs.versions-matrix)}} steps: - uses: actions/checkout@v4 @@ -201,72 +178,22 @@ jobs: with: results: ${{ runner.os }}-r${{ matrix.r }} - - uses: ./.github/workflows/update-status - if: always() - with: - sha: ${{ needs.rcc-smoke.outputs.sha }} - - suggests-matrix: - runs-on: ubuntu-22.04 - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - - name: Collect suggests deps - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: ./.github/workflows/rate-limit - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - uses: r-lib/actions/setup-r@v2 - with: - install-r: false - use-public-rspm: true - - - id: set-matrix - uses: ./.github/workflows/dep-suggests-matrix-read - - check-suggests-matrix: - runs-on: ubuntu-22.04 - needs: suggests-matrix - - name: Check suggests deps - - if: ${{ needs.suggests-matrix.outputs.matrix != '' }} - - steps: - - name: Install json2yaml - run: | - sudo npm install -g json2yaml - - - name: Check matrix definition - run: | - matrix='${{ needs.suggests-matrix.outputs.matrix }}' - echo $matrix - echo $matrix | jq . - echo $matrix | json2yaml - rcc-suggests: needs: - rcc-smoke - - suggests-matrix runs-on: ubuntu-22.04 - name: Without ${{ matrix.package }} + if: ${{ needs.rcc-smoke.outputs.dep-suggests-matrix != '' }} - if: ${{ needs.suggests-matrix.outputs.matrix != '' }} + name: Without ${{ matrix.package }} # Begin custom: services # End custom: services strategy: fail-fast: false - matrix: ${{fromJson(needs.suggests-matrix.outputs.matrix)}} + matrix: ${{fromJson(needs.rcc-smoke.outputs.dep-suggests-matrix)}} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/commit/action.yml b/.github/workflows/commit/action.yml index d5049bc56..ed6f9b896 100644 --- a/.github/workflows/commit/action.yml +++ b/.github/workflows/commit/action.yml @@ -20,9 +20,13 @@ runs: if [ -n "$(git status --porcelain)" ]; then echo "Changed" protected=${{ github.ref_protected }} - if [ "${protected}" = "true" ]; then + foreign=${{ github.event.pull_request.head.repo.full_name != github.repository }} + if [ "${foreign}" = "true" ]; then + # https://github.com/krlmlr/actions-sync/issues/44 + echo "Can't push to foreign branch" + elif [ "${protected}" = "true" ]; then current_branch=$(git branch --show-current) - new_branch=gha-commit + new_branch=gha-commit-$(git rev-parse --short HEAD) git checkout -b ${new_branch} git add . git commit -m "chore: Auto-update from GitHub Actions"$'\n'$'\n'"Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" @@ -38,6 +42,7 @@ runs: fi gh workflow run rcc -f ref=$(git rev-parse HEAD) + gh pr merge --merge --auto else git fetch if [ -n "${GITHUB_HEAD_REF}" ]; then @@ -50,8 +55,9 @@ runs: git add . git commit -m "chore: Auto-update from GitHub Actions"$'\n'$'\n'"Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" git push -u origin HEAD + + # Only set output if changed + echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT fi fi - # Unconditionally set the output because it could come from a manually triggered run - echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT shell: bash diff --git a/.github/workflows/dep-suggests-matrix-read/action.yml b/.github/workflows/dep-suggests-matrix-read/action.yml deleted file mode 100644 index 39e7a7b23..000000000 --- a/.github/workflows/dep-suggests-matrix-read/action.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: "Actions to read a matrix with all suggested packages, computed with the dep-suggests-matrix action" -outputs: - matrix: - description: "Generated matrix" - value: ${{ steps.set-matrix.outputs.matrix }} - -runs: - using: "composite" - steps: - - name: Install json2yaml - run: | - sudo npm install -g json2yaml - shell: bash - - - id: set-matrix - run: | - # Empty contents if no suggested packages - matrix=$(cat .github/dep-suggests-matrix.json || true) - if [ -n "$matrix" ]; then - echo $matrix | jq . - echo $matrix | json2yaml - fi - echo "matrix=$matrix" | tee -a $GITHUB_OUTPUT - shell: bash diff --git a/.github/workflows/dep-suggests-matrix/action.R b/.github/workflows/dep-suggests-matrix/action.R index 139519403..eff3a502c 100644 --- a/.github/workflows/dep-suggests-matrix/action.R +++ b/.github/workflows/dep-suggests-matrix/action.R @@ -21,9 +21,12 @@ get_deps <- function() { if (Sys.getenv("GITHUB_BASE_REF") != "") { print(Sys.getenv("GITHUB_BASE_REF")) - has_diff <- (system("git diff ${{ github.event.pull_request.base.sha }}... | egrep '^[+][^+]' | grep -q ::") == 0) + system("git fetch origin ${GITHUB_BASE_REF}") + # Use .. to avoid having to fetch the entire history + # https://github.com/krlmlr/actions-sync/issues/45 + has_diff <- (system("git diff origin/${GITHUB_BASE_REF}.. | egrep '^[+][^+]' | grep -q ::") == 0) if (has_diff) { - system("git diff ${{ github.event.pull_request.base.sha }}... | egrep '^[+][^+]' | grep -q ::") + system("git diff origin/${GITHUB_BASE_REF}.. | egrep '^[+][^+]' | grep -q ::") packages <- get_deps() } else { writeLines("No changes using :: found, not checking without suggested packages") @@ -39,9 +42,8 @@ if (length(packages) > 0) { paste0('"', packages, '"', collapse = ","), ']}' ) + writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT")) + writeLines(json) } else { - json <- character() + writeLines("No suggested packages found.") } - -writeLines(json, ".github/dep-suggests-matrix.json") -writeLines(json) diff --git a/.github/workflows/get-extra/action.yml b/.github/workflows/get-extra/action.yml new file mode 100644 index 000000000..84c56d9b7 --- /dev/null +++ b/.github/workflows/get-extra/action.yml @@ -0,0 +1,16 @@ +name: "Action to determine extra packages to be installed" +outputs: + packages: + description: "List of extra packages" + value: ${{ steps.get-extra.outputs.packages }} + +runs: + using: "composite" + steps: + - name: Get extra packages + id: get-extra + run: | + set -x + packages=$( ( grep Config/gha/extra-packages DESCRIPTION || true ) | cut -d " " -f 2) + echo packages=$packages >> $GITHUB_OUTPUT + shell: bash diff --git a/.github/workflows/matrix-check/action.yml b/.github/workflows/matrix-check/action.yml new file mode 100644 index 000000000..b94304819 --- /dev/null +++ b/.github/workflows/matrix-check/action.yml @@ -0,0 +1,23 @@ +name: "Actions to check a matrix with all R and OS versions, computed with the versions-matrix action" +inputs: + matrix: + description: "Generated matrix" + required: true + +runs: + using: "composite" + steps: + - name: Install json2yaml + run: | + sudo npm install -g json2yaml + shell: bash + + - run: | + matrix='${{ inputs.matrix }}' + if [ -n "${matrix}" ]; then + echo $matrix | jq . + echo $matrix | json2yaml + else + echo "No matrix found" + fi + shell: bash diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index de69b1494..a2206afc4 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -42,7 +42,7 @@ jobs: install-r: false cache-version: pkgdown-2 needs: website - extra-packages: r-lib/pkgdown local::. + extra-packages: pkgdown - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' diff --git a/.github/workflows/update-status/action.yml b/.github/workflows/update-status/action.yml deleted file mode 100644 index d9462fce3..000000000 --- a/.github/workflows/update-status/action.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: 'Update status' -description: 'Update status' -inputs: - sha: - description: 'SHA to update' - required: true - -runs: - using: "composite" - steps: - # It's difficult to get the URL of the current job. - # The /jobs API and/or the `github` context are misaligned. - # The duckdbneo repository contains several failed attempts. - - run: | - set -x - if [ -n '${{ inputs.sha }}' ]; then - export GH_TOKEN=${{ github.token }} - - html_url=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .html_url) - - # Check if a failing status has been set already - status=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - repos/${{ github.repository }}/commits/${{ inputs.sha }}/status | jq -r .state) - - if [ "${status}" != "error" ] && [ "${status}" != "failure" ]; then - gh api \ - --method POST \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - repos/${{ github.repository }}/statuses/${{ inputs.sha }} \ - -f "state=${{ job.status }}" -f "target_url=$html_url" -f "description=${{ github.workflow }} / ${{ github.job }}" -f "context=actions-sync" - fi - fi - shell: bash diff --git a/.github/workflows/versions-matrix-read/action.yml b/.github/workflows/versions-matrix-read/action.yml deleted file mode 100644 index 4aa463975..000000000 --- a/.github/workflows/versions-matrix-read/action.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Actions to read a matrix with all R and OS versions, computed with the versions-matrix action" -outputs: - matrix: - description: "Generated matrix" - value: ${{ steps.set-matrix.outputs.matrix }} - -runs: - using: "composite" - steps: - - name: Install json2yaml - run: | - sudo npm install -g json2yaml - shell: bash - - - id: set-matrix - run: | - matrix=$(cat .github/versions-matrix.json || echo '{"include":[{"os":"macos-latest","r":"release"}]}') - echo $matrix | jq . - echo $matrix | json2yaml - echo "matrix=$matrix" | tee -a $GITHUB_OUTPUT - shell: bash diff --git a/.github/workflows/versions-matrix/action.R b/.github/workflows/versions-matrix/action.R index 4a59fe66b..b8e2dcfb1 100644 --- a/.github/workflows/versions-matrix/action.R +++ b/.github/workflows/versions-matrix/action.R @@ -1,5 +1,25 @@ -# FIXME: Dynamic lookup by parsing https://svn.r-project.org/R/tags/ -r_versions <- c("devel", paste0("4.", 4:0)) +# Determine active versions of R to test against +tags <- xml2::read_html("https://svn.r-project.org/R/tags/") + +bullets <- + tags |> + xml2::xml_find_all("//li") |> + xml2::xml_text() + +version_bullets <- grep("^R-([0-9]+-[0-9]+-[0-9]+)/$", bullets, value = TRUE) +versions <- unique(gsub("^R-([0-9]+)-([0-9]+)-[0-9]+/$", "\\1.\\2", version_bullets)) + +r_release <- head(sort(as.package_version(versions), decreasing = TRUE), 5) + +deps <- desc::desc_get_deps() +r_crit <- deps$version[deps$package == "R"] +if (length(r_crit) == 1) { + min_r <- as.package_version(gsub("^>= ([0-9]+[.][0-9]+)(?:.*)$", "\\1", r_crit)) + r_release <- r_release[r_release >= min_r] +} + +r_versions <- c("devel", as.character(r_release)) + macos <- data.frame(os = "macos-latest", r = r_versions[2:3]) windows <- data.frame(os = "windows-latest", r = r_versions[1:3]) linux_devel <- data.frame(os = "ubuntu-22.04", r = r_versions[1], `http-user-agent` = "release", check.names = FALSE) @@ -36,5 +56,5 @@ to_json <- function(x) { configs <- unlist(lapply(include_list, to_json)) json <- paste0('{"include":[', paste(configs, collapse = ","), ']}') -writeLines(json, ".github/versions-matrix.json") +writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT")) writeLines(json) diff --git a/.github/workflows/versions-matrix/action.yml b/.github/workflows/versions-matrix/action.yml index 6ac164b8f..af7378a1b 100644 --- a/.github/workflows/versions-matrix/action.yml +++ b/.github/workflows/versions-matrix/action.yml @@ -1,8 +1,18 @@ name: "Actions to compute a matrix with all R and OS versions" +outputs: + matrix: + description: "Generated matrix" + value: ${{ steps.set-matrix.outputs.matrix }} + runs: using: "composite" steps: + - name: Install json2yaml + run: | + sudo npm install -g json2yaml + shell: bash + - id: set-matrix run: | Rscript ./.github/workflows/versions-matrix/action.R From f431263bc6264333e8f5a56a458b2c2c4376cb61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Fri, 30 Aug 2024 06:26:00 +0200 Subject: [PATCH 17/26] ci: Improve support for protected branches with fledge --- .github/workflows/fledge.yaml | 68 ++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/.github/workflows/fledge.yaml b/.github/workflows/fledge.yaml index 81c2d0c0a..d880c55d7 100644 --- a/.github/workflows/fledge.yaml +++ b/.github/workflows/fledge.yaml @@ -3,12 +3,18 @@ name: fledge on: # for manual triggers workflow_dispatch: + inputs: + pr: + description: "Create PR" + required: false + type: boolean + default: false # daily run schedule: - cron: "30 0 * * *" concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }} cancel-in-progress: true jobs: @@ -19,8 +25,12 @@ jobs: steps: - name: Check if the repo is forked id: check + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo "is_forked=$(curl -s -H "Accept: application/vnd.github+json" -H 'Authorization: Bearer ${{ github.token }}' -H "X-GitHub-Api-Version: 2022-11-28" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY} | jq .fork)" >> $GITHUB_OUTPUT + is_forked=$(gh api repos/${{ github.repository }} | jq .fork) + echo "is_forked=${is_forked}" >> $GITHUB_OUTPUT + shell: bash fledge: runs-on: ubuntu-latest @@ -28,31 +38,71 @@ jobs: if: needs.check_fork.outputs.is_forked == 'false' permissions: contents: write + pull-requests: write + actions: write env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} FLEDGE_GHA_CI: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: ./.github/workflows/git-identity + - name: Configure Git identity + run: | + env | sort + git config --local user.name "$GITHUB_ACTOR" + git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + shell: bash + + - name: Update apt + run: | + sudo apt-get update + shell: bash - - uses: ./.github/workflows/install + - uses: r-lib/actions/setup-r@v2 with: - token: ${{ secrets.GITHUB_TOKEN }} install-r: false - cache-version: fledge-1 + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + with: + pak-version: devel packages: cynkra/fledge + cache-version: fledge-1 + + - name: Switch to branch if branch protection is enabled + if: github.ref_protected == 'true' || inputs.pr == 'true' + run: | + git checkout -b fledge + git push -f -u origin HEAD + shell: bash - name: Bump version + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} run: | - if (fledge::bump_version(which = "dev", no_change_behavior = "noop")) { + check_default_branch <- ("${{ github.ref_protected == 'true' || inputs.pr == 'true' }}" != "true") + if (fledge::bump_version(which = "dev", no_change_behavior = "noop", check_default_branch = check_default_branch)) { fledge::finalize_version(push = TRUE) } shell: Rscript {0} + - name: Create and merge PR if branch protection is enabled + if: github.ref_protected == 'true' || inputs.pr == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -x + gh pr create --base main --head fledge --fill-first + gh workflow run rcc -f ref=$(git rev-parse HEAD) + gh pr merge --merge --auto + shell: bash + - name: Check release + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} run: | fledge:::release_after_cran_built_binaries() shell: Rscript {0} From 2327383be129502288d99d3b55d6c64c92ea5633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Fri, 30 Aug 2024 07:45:48 +0200 Subject: [PATCH 18/26] ci: Install local package for pkgdown builds --- .github/workflows/R-CMD-check.yaml | 2 +- .github/workflows/pkgdown.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index b622c4807..d238a6bc2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,7 +66,7 @@ jobs: cache-version: rcc-smoke-2 needs: check, website # Beware of using dev pkgdown here, has brought in dev dependencies in the past - extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler pkgdown + extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler pkgdown local::. - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index a2206afc4..09dc06382 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -42,7 +42,7 @@ jobs: install-r: false cache-version: pkgdown-2 needs: website - extra-packages: pkgdown + extra-packages: pkgdown local::. - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' From ea7251ac81ec1062d3b35dbf56360798d0793ca3 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sat, 31 Aug 2024 01:51:07 +0000 Subject: [PATCH 19/26] Bump version to 1.9.0.9022 --- DESCRIPTION | 2 +- NEWS.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 07da370f8..58abf3a16 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9021 +Version: 1.9.0.9022 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index 6ff34aabd..cb7ab0f15 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,16 @@ +# pillar 1.9.0.9022 + +## Continuous integration + + - Install local package for pkgdown builds. + + - Improve support for protected branches with fledge. + + - Improve support for protected branches, without fledge. + + # pillar 1.9.0.9021 ## Continuous integration From e4b9b37d387f812d36982c91ac4daf3514b13b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 14 Sep 2024 10:37:59 +0200 Subject: [PATCH 20/26] ci: Install via R CMD INSTALL ., not pak (#672) * ci: Install via R CMD INSTALL ., not pak * ci: Bump version of upload-artifact action --- .github/workflows/R-CMD-check.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d238a6bc2..428cec137 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,7 +66,12 @@ jobs: cache-version: rcc-smoke-2 needs: check, website # Beware of using dev pkgdown here, has brought in dev dependencies in the past - extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler pkgdown local::. + extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler pkgdown deps::. + + - name: Install package + run: | + R CMD INSTALL . + shell: bash - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' @@ -110,7 +115,7 @@ jobs: echo -n "${{ steps.commit.outputs.sha }}" > rcc-smoke-sha.txt shell: bash - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: rcc-smoke-sha path: rcc-smoke-sha.txt From 6f6e9dc89d4dbaf983ca02b151b5ab1cbf7518ca Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sun, 15 Sep 2024 02:07:27 +0000 Subject: [PATCH 21/26] Bump version to 1.9.0.9023 --- DESCRIPTION | 2 +- NEWS.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 58abf3a16..e7a00cb9c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9022 +Version: 1.9.0.9023 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index cb7ab0f15..82a94f689 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,16 @@ +# pillar 1.9.0.9023 + +## Continuous integration + + - Install via R CMD INSTALL ., not pak (#672). + + - ci: Install via R CMD INSTALL ., not pak + + - ci: Bump version of upload-artifact action + + # pillar 1.9.0.9022 ## Continuous integration From 49a63dec52f440b65cde9172831e2e6402b24398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 19 Oct 2024 18:38:14 +0200 Subject: [PATCH 22/26] chore: Revdepcheck results --- revdep/README.md | 8 +---- revdep/cran.md | 14 ++------ revdep/failures.md | 42 ++++++++++++------------ revdep/problems.md | 82 +--------------------------------------------- 4 files changed, 26 insertions(+), 120 deletions(-) diff --git a/revdep/README.md b/revdep/README.md index 8da62ac3d..5377f304a 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -4,11 +4,5 @@ |package |version |error |warning |note | |:----------|:-------|:-----|:-------|:----| -|incidence2 |1.2.3 |1 | | | - -## New problems (1) - -|package |version |error |warning |note | -|:-------|:-------|:------|:-------|:----| -|[prt](problems.md#prt)|0.1.5 |__+2__ |__+1__ | | +|tidyseurat |0.8.0 |1 | | | diff --git a/revdep/cran.md b/revdep/cran.md index f9b3f6301..95a78e658 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,20 +1,12 @@ ## revdepcheck results -We checked 100 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. +We checked 122 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. - * We saw 1 new problems + * We saw 0 new problems * We failed to check 1 packages Issues with CRAN packages are summarised below. -### New problems -(This reports the first line of each new failure) - -* prt - checking examples ... ERROR - checking tests ... ERROR - checking re-building of vignette outputs ... WARNING - ### Failed to check -* incidence2 (NA) +* tidyseurat (NA) diff --git a/revdep/failures.md b/revdep/failures.md index 4097552ba..a49456a4a 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -1,23 +1,23 @@ -# incidence2 +# tidyseurat
-* Version: 1.2.3 -* GitHub: https://github.com/reconverse/incidence2 -* Source code: https://github.com/cran/incidence2 -* Date/Publication: 2021-11-07 22:00:02 UTC -* Number of recursive dependencies: 87 +* Version: 0.8.0 +* GitHub: https://github.com/stemangiola/tidyseurat +* Source code: https://github.com/cran/tidyseurat +* Date/Publication: 2024-01-10 04:50:02 UTC +* Number of recursive dependencies: 195 -Run `revdepcheck::cloud_details(, "incidence2")` for more info +Run `revdepcheck::cloud_details(, "tidyseurat")` for more info
## In both -* checking whether package ‘incidence2’ can be installed ... ERROR +* checking whether package ‘tidyseurat’ can be installed ... ERROR ``` Installation failed. - See ‘/tmp/workdir/incidence2/new/incidence2.Rcheck/00install.out’ for details. + See ‘/tmp/workdir/tidyseurat/new/tidyseurat.Rcheck/00install.out’ for details. ``` ## Installation @@ -25,38 +25,38 @@ Run `revdepcheck::cloud_details(, "incidence2")` for more info ### Devel ``` -* installing *source* package ‘incidence2’ ... -** package ‘incidence2’ successfully unpacked and MD5 sums checked +* installing *source* package ‘tidyseurat’ ... +** package ‘tidyseurat’ successfully unpacked and MD5 sums checked ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading -Error : The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0. -Error: unable to load R code in package ‘incidence2’ +Error: package or namespace load failed for ‘SeuratObject’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): + namespace ‘Matrix’ 1.5-4.1 is already loaded, but >= 1.6.4 is required Execution halted -ERROR: lazy loading failed for package ‘incidence2’ -* removing ‘/tmp/workdir/incidence2/new/incidence2.Rcheck/incidence2’ +ERROR: lazy loading failed for package ‘tidyseurat’ +* removing ‘/tmp/workdir/tidyseurat/new/tidyseurat.Rcheck/tidyseurat’ ``` ### CRAN ``` -* installing *source* package ‘incidence2’ ... -** package ‘incidence2’ successfully unpacked and MD5 sums checked +* installing *source* package ‘tidyseurat’ ... +** package ‘tidyseurat’ successfully unpacked and MD5 sums checked ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading -Error : The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0. -Error: unable to load R code in package ‘incidence2’ +Error: package or namespace load failed for ‘SeuratObject’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): + namespace ‘Matrix’ 1.5-4.1 is already loaded, but >= 1.6.4 is required Execution halted -ERROR: lazy loading failed for package ‘incidence2’ -* removing ‘/tmp/workdir/incidence2/old/incidence2.Rcheck/incidence2’ +ERROR: lazy loading failed for package ‘tidyseurat’ +* removing ‘/tmp/workdir/tidyseurat/old/tidyseurat.Rcheck/tidyseurat’ ``` diff --git a/revdep/problems.md b/revdep/problems.md index db8ee8a0a..9a2073633 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -1,81 +1 @@ -# prt - -
- -* Version: 0.1.5 -* GitHub: https://github.com/nbenn/prt -* Source code: https://github.com/cran/prt -* Date/Publication: 2022-07-18 09:40:02 UTC -* Number of recursive dependencies: 67 - -Run `revdepcheck::cloud_details(, "prt")` for more info - -
- -## Newly broken - -* checking examples ... ERROR - ``` - Running examples in ‘prt-Ex.R’ failed - The error most likely occurred in: - - > ### Name: print.prt - > ### Title: Printing prt - > ### Aliases: print.prt format.prt trunc_dt - > - > ### ** Examples - > - > cars <- as_prt(mtcars) - ... - 9. ├─base::format(x, ..., n = n, width = width, max_extra_cols = max_extra_cols) - 10. └─prt:::format.prt(x, ..., n = n, width = width, max_extra_cols = max_extra_cols) - 11. ├─base::format(trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols)) - 12. └─prt::trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols) - 13. └─prt:::shrink_dt(df, rows) - 14. └─pillar::colonnade(df, has_row_id = FALSE) - 15. └─lifecycle::deprecate_stop("1.9.0", "pillar::colonnade()", "pillar::tbl_format_setup()") - 16. └─lifecycle:::deprecate_stop0(msg) - 17. └─rlang::cnd_signal(...) - Execution halted - ``` - -* checking tests ... ERROR - ``` - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Last 13 lines of output: - 16. │ │ └─base::is.factor(x) - 17. │ └─base::paste0(...) - 18. ├─base::format(x, ..., n = n, width = width, max_extra_cols = max_extra_cols) - 19. └─prt:::format.prt(x, ..., n = n, width = width, max_extra_cols = max_extra_cols) - 20. ├─base::format(trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols)) - 21. └─prt::trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols) - 22. └─prt:::shrink_dt(df, rows) - 23. └─pillar::colonnade(df, has_row_id = FALSE) - 24. └─lifecycle::deprecate_stop("1.9.0", "pillar::colonnade()", "pillar::tbl_format_setup()") - 25. └─lifecycle:::deprecate_stop0(msg) - 26. └─rlang::cnd_signal(...) - - [ FAIL 4 | WARN 0 | SKIP 0 | PASS 257 ] - Error: Test failures - Execution halted - ``` - -* checking re-building of vignette outputs ... WARNING - ``` - Error(s) in re-building vignettes: - ... - --- re-building ‘prt.Rmd’ using rmarkdown - Quitting from lines 35-37 (prt.Rmd) - Error: processing vignette 'prt.Rmd' failed with diagnostics: - `colonnade()` was deprecated in pillar 1.9.0 and is now defunct. - ℹ Please use `tbl_format_setup()` instead. - --- failed re-building ‘prt.Rmd’ - - SUMMARY: processing the following file failed: - ‘prt.Rmd’ - - Error: Vignette re-building failed. - Execution halted - ``` - +*Wow, no problems at all. :)* \ No newline at end of file From 640717e82e3fb70051c5aa7767138055979b738e Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sun, 20 Oct 2024 02:10:30 +0000 Subject: [PATCH 23/26] Bump version to 1.9.0.9024 --- DESCRIPTION | 2 +- NEWS.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index e7a00cb9c..edff1c6a8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9023 +Version: 1.9.0.9024 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index 82a94f689..b8b54ef71 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ +# pillar 1.9.0.9024 + +## Chore + + - Revdepcheck results. + + # pillar 1.9.0.9023 ## Continuous integration From a856202f4800c34d27553984a3ac0e146d14a189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 27 Oct 2024 05:53:30 +0100 Subject: [PATCH 24/26] ci: Use pkgdown branch (#674) * ci: Use pkgdown branch * ci: Updates from duckdb --- .github/workflows/R-CMD-check-status.yaml | 5 +- .github/workflows/R-CMD-check.yaml | 94 ++++++++++++++++++- .github/workflows/pkgdown.yaml | 2 +- .github/workflows/update-snapshots/action.yml | 9 +- 4 files changed, 99 insertions(+), 11 deletions(-) diff --git a/.github/workflows/R-CMD-check-status.yaml b/.github/workflows/R-CMD-check-status.yaml index 15860acbb..b9bdf4e4a 100644 --- a/.github/workflows/R-CMD-check-status.yaml +++ b/.github/workflows/R-CMD-check-status.yaml @@ -16,11 +16,10 @@ jobs: name: "Update commit status" - # Only run if triggered by rcc workflow - if: github.event.workflow_run.name == 'rcc' - steps: - name: "Update commit status" + # Only run if triggered by rcc workflow + if: github.event.workflow_run.name == 'rcc' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 428cec137..56ae58c6b 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -18,9 +18,17 @@ on: workflow_dispatch: inputs: ref: - description: "Branch or tag to check out" + description: "Branch, tag, or commit to check out" required: false default: "main" + versions-matrix: + description: "Create a matrix of R versions" + type: boolean + default: false + dep-suggests-matrix: + description: "Create a matrix of suggested dependencies" + type: boolean + default: false merge_group: types: - checks_requested @@ -51,6 +59,38 @@ jobs: with: ref: ${{ inputs.ref }} + - name: Update status for rcc + # FIXME: Wrap into action + if: github.event_name == 'workflow_dispatch' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Check status of this workflow + state="pending" + sha=${{ inputs.ref }} + if [ -z "${sha}" ]; then + sha=${{ github.head_ref }} + fi + if [ -z "${sha}" ]; then + sha=${{ github.sha }} + fi + sha=$(git rev-parse ${sha}) + + html_url=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .html_url) + + description="${{ github.workflow }} / ${{ github.job }}" + + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/statuses/${sha} \ + -f "state=${state}" -f "target_url=${html_url}" -f "description=${description}" -f "context=rcc" + shell: bash + - uses: ./.github/workflows/rate-limit with: token: ${{ secrets.GITHUB_TOKEN }} @@ -66,25 +106,29 @@ jobs: cache-version: rcc-smoke-2 needs: check, website # Beware of using dev pkgdown here, has brought in dev dependencies in the past - extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler pkgdown deps::. + extra-packages: any::rcmdcheck r-lib/roxygen2 any::decor r-lib/styler r-lib/pkgdown@f-readme-tweak deps::. - name: Install package run: | - R CMD INSTALL . + _R_SHLIB_STRIP_=true R CMD INSTALL . shell: bash - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' - id: versions-matrix - # Only run for pull requests if the base repo is different from the head repo, always run for other events - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + # Only run for pull requests if the base repo is different from the head repo, not for workflow_dispatch if not requested, always run for other events + if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && (github.event_name != 'workflow_dispatch' || inputs.versions-matrix) uses: ./.github/workflows/versions-matrix - id: dep-suggests-matrix + # Not for workflow_dispatch if not requested, always run for other events + if: github.event_name != 'workflow_dispatch' || inputs.dep-suggests-matrix uses: ./.github/workflows/dep-suggests-matrix - uses: ./.github/workflows/update-snapshots + with: + base: ${{ inputs.ref || github.head_ref }} - uses: ./.github/workflows/style @@ -120,6 +164,46 @@ jobs: name: rcc-smoke-sha path: rcc-smoke-sha.txt + - name: Update status for rcc + # FIXME: Wrap into action + if: always() && github.event_name == 'workflow_dispatch' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Check status of this workflow + if [ "${{ job.status }}" == "success" ]; then + state="success" + else + state="failure" + fi + + sha=${{ steps.commit.outputs.sha }} + if [ -z "${sha}" ]; then + sha=${{ inputs.ref }} + fi + if [ -z "${sha}" ]; then + sha=${{ github.head_ref }} + fi + if [ -z "${sha}" ]; then + sha=${{ github.sha }} + fi + sha=$(git rev-parse ${sha}) + + html_url=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/actions/runs/${{ github.run_id }} | jq -r .html_url) + + description="${{ github.workflow }} / ${{ github.job }}" + + gh api \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${{ github.repository }}/statuses/${sha} \ + -f "state=${state}" -f "target_url=${html_url}" -f "description=${description}" -f "context=rcc" + shell: bash + rcc-smoke-check-matrix: runs-on: ubuntu-latest diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 09dc06382..6afddb16f 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -42,7 +42,7 @@ jobs: install-r: false cache-version: pkgdown-2 needs: website - extra-packages: pkgdown local::. + extra-packages: r-lib/pkgdown@f-readme-tweak local::. - uses: ./.github/workflows/custom/after-install if: hashFiles('.github/workflows/custom/after-install/action.yml') != '' diff --git a/.github/workflows/update-snapshots/action.yml b/.github/workflows/update-snapshots/action.yml index 6322dc156..5ee7e3ecc 100644 --- a/.github/workflows/update-snapshots/action.yml +++ b/.github/workflows/update-snapshots/action.yml @@ -3,6 +3,11 @@ description: > This action will run `testthat::test_local()` for tests that seem to use snapshots, this is determined by reading and grepping the test files. If the tests are failing, snapshots are updated, and a pull request is opened. +inputs: + base: + description: "The base branch to create the pull request against." + required: false + default: "main" runs: using: "composite" @@ -67,8 +72,8 @@ runs: id: cpr uses: peter-evans/create-pull-request@v6 with: - base: ${{ github.head_ref }} - branch: snapshot-${{ github.ref_name }}-${{ github.job }}-${{ steps.matrix-desc.outputs.branch }} + base: ${{ inputs.base }} + branch: snapshot-${{ inputs.base }}-${{ github.job }}-${{ steps.matrix-desc.outputs.branch }} delete-branch: true title: "test: Snapshot updates for ${{ github.job }} (${{ steps.matrix-desc.outputs.text }})" body: "Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action${{ github.event.number && format(' for #{0}', github.event.number) || '' }}." From 167c94354088af93ceebd24f4bac4a914ae51a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 27 Oct 2024 06:09:54 +0100 Subject: [PATCH 25/26] ci: Trigger run (#675) --- .github/workflows/R-CMD-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 56ae58c6b..e2234cde6 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -41,6 +41,7 @@ concurrency: name: rcc + jobs: rcc-smoke: runs-on: ubuntu-latest From 8c9a06afb1adbace35dec0c9899d6ed0528205cb Mon Sep 17 00:00:00 2001 From: krlmlr Date: Mon, 28 Oct 2024 02:07:52 +0000 Subject: [PATCH 26/26] Bump version to 1.9.0.9025 --- DESCRIPTION | 2 +- NEWS.md | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index edff1c6a8..20429ae09 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pillar Title: Coloured Formatting for Columns -Version: 1.9.0.9024 +Version: 1.9.0.9025 Authors@R: c(person(given = "Kirill", family = "M\u00fcller", diff --git a/NEWS.md b/NEWS.md index b8b54ef71..b52d20d26 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,18 @@ +# pillar 1.9.0.9025 + +## Continuous integration + + - Trigger run (#675). + + - Use pkgdown branch (#674). + + - ci: Use pkgdown branch + + - ci: Updates from duckdb + + # pillar 1.9.0.9024 ## Chore