From 326c7014166b9ab2e2b72f8431abd0548ba51d34 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Tue, 18 Mar 2025 19:05:21 -0600 Subject: [PATCH 01/12] Add regression test to quarto vignette Calling `library(pkgdown)` should cause a GHA failure due to quarto not seeing the temporary directory that pkgdown is installed in. --- vignettes/quarto.qmd | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/vignettes/quarto.qmd b/vignettes/quarto.qmd index dd95085dd..28a691cf7 100644 --- a/vignettes/quarto.qmd +++ b/vignettes/quarto.qmd @@ -1,6 +1,6 @@ --- title: quarto vignettes -description: > +description: > Learn how quarto vignettes work with pkgdown, including currently supported features and known limitations. vignette: > @@ -8,11 +8,18 @@ vignette: > %\VignetteEngine{quarto::html} %\VignetteEncoding{UTF-8} knitr: - opts_chunk: + opts_chunk: collapse: true comment: '#>' --- +```{r} +#| include: false +# this library call is a regression test for quarto build errors on GHA +# see https://github.com/r-lib/pkgdown/issues/2830 and related issues +library(pkgdown) +``` + pkgdown effectively uses quarto only to generate HTML and then supplies its own CSS and JS. This means that when quarto introduces new features, pkgdown may lag behind in their support. If you're trying out something that doesn't work (and isn't mentioned explicitly below), please [file an issue](https://github.com/r-lib/pkgdown/issues) so we can look into it. ## Operation @@ -26,7 +33,7 @@ project: ### GitHub Actions -The `setup-r-dependencies` action will [automatically](https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies#usage) install Quarto in your GitHub Actions if a .qmd file is present in your repository (see the `install-quarto` parameter for more details). +The `setup-r-dependencies` action will [automatically](https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies#usage) install Quarto in your GitHub Actions if a .qmd file is present in your repository (see the `install-quarto` parameter for more details). ## Limitations @@ -41,7 +48,7 @@ The `setup-r-dependencies` action will [automatically](https://github.com/r-lib/ ## Supported features -The following sections demonstrate a bunch of useful quarto features so that we can make sure that they work. +The following sections demonstrate a bunch of useful quarto features so that we can make sure that they work. ### Inline formatting @@ -76,7 +83,7 @@ $$ \frac{\partial \mathrm C}{ \partial \mathrm t } + \frac{1}{2}\sigma^{2} \mathrm S^{2} \frac{\partial^{2} \mathrm C}{\partial \mathrm C^2} + \mathrm r \mathrm S \frac{\partial \mathrm C}{\partial \mathrm S}\ = - \mathrm r \mathrm C + \mathrm r \mathrm C $$ {#eq-black-scholes} From b41772d274ee7522c443ff8e5c642d77010643c4 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Tue, 18 Mar 2025 19:27:57 -0600 Subject: [PATCH 02/12] Move test to its own section at the bottom --- vignettes/quarto.qmd | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/vignettes/quarto.qmd b/vignettes/quarto.qmd index 28a691cf7..edb1cccd3 100644 --- a/vignettes/quarto.qmd +++ b/vignettes/quarto.qmd @@ -13,13 +13,6 @@ knitr: comment: '#>' --- -```{r} -#| include: false -# this library call is a regression test for quarto build errors on GHA -# see https://github.com/r-lib/pkgdown/issues/2830 and related issues -library(pkgdown) -``` - pkgdown effectively uses quarto only to generate HTML and then supplies its own CSS and JS. This means that when quarto introduces new features, pkgdown may lag behind in their support. If you're trying out something that doesn't work (and isn't mentioned explicitly below), please [file an issue](https://github.com/r-lib/pkgdown/issues) so we can look into it. ## Operation @@ -104,3 +97,13 @@ Black-Scholes (@eq-black-scholes) is a mathematical model that seeks to explain * [x] Cross-references * [x] Footnotes * [x] Callouts + +## Regression tests + +This is a regression test for quarto build errors on GHA. See https://github.com/r-lib/pkgdown/issues/2830 and related issues. + +```{r} +library(pkgdown) +packageVersion("pkgdown") +packageVersion("quarto") +``` From 2290ddd4b59bc4ca1a2fd010bd03a79ee37af76d Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Tue, 18 Mar 2025 19:39:11 -0600 Subject: [PATCH 03/12] Install quarto libpath branch --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 4b2031ab0..5af648507 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -66,6 +66,7 @@ Suggests: VignetteBuilder: knitr, quarto +Remotes: quarto-dev/quarto-r@libpaths Config/Needs/website: usethis, servr Config/potools/style: explicit Config/testthat/edition: 3 From 0ef2cc8f971a0c81e04bbd45661e86cc1badf0df Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Tue, 18 Mar 2025 19:44:16 -0600 Subject: [PATCH 04/12] Add dev quarto to setup dependencies --- .github/workflows/R-CMD-check.yaml | 2 +- DESCRIPTION | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ceab18b3a..481050c5a 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -56,7 +56,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck + extra-packages: any::rcmdcheck, quarto-dev/quarto-r@libpaths needs: check - uses: r-lib/actions/check-r-package@v2 diff --git a/DESCRIPTION b/DESCRIPTION index 5af648507..4b2031ab0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -66,7 +66,6 @@ Suggests: VignetteBuilder: knitr, quarto -Remotes: quarto-dev/quarto-r@libpaths Config/Needs/website: usethis, servr Config/potools/style: explicit Config/testthat/edition: 3 From 6329a7e42b6e9035ddb67c36ce12c40a00b65b91 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Tue, 18 Mar 2025 19:57:58 -0600 Subject: [PATCH 05/12] Add QUARTO_R_QUIET --- .github/workflows/R-CMD-check.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 481050c5a..7f6d8fa44 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -60,6 +60,8 @@ jobs: needs: check - uses: r-lib/actions/check-r-package@v2 + env: + QUARTO_R_QUIET: FALSE with: upload-snapshots: true build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' From 6aadc68c709882e8d77c5fbf73df251e77260217 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Wed, 19 Mar 2025 04:50:08 -0600 Subject: [PATCH 06/12] Skip failing test for now --- tests/testthat/test-build-article.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-build-article.R b/tests/testthat/test-build-article.R index 254a71256..9379fe50a 100644 --- a/tests/testthat/test-build-article.R +++ b/tests/testthat/test-build-article.R @@ -234,6 +234,7 @@ test_that("build_article yields useful error if pandoc fails", { test_that("build_article yields useful error if R fails", { skip_if_no_pandoc() + skip_on_ci() pkg <- local_pkgdown_site() pkg <- pkg_add_file( From 46e8075adfbf5a4c402965a5e377f51540480b5e Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Wed, 19 Mar 2025 05:24:42 -0600 Subject: [PATCH 07/12] Test that regression can fail on GHA linux/osx --- .github/workflows/R-CMD-check.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 7f6d8fa44..b6ddb00f6 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -56,7 +56,8 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck, quarto-dev/quarto-r@libpaths + # extra-packages: any::rcmdcheck, quarto-dev/quarto-r@libpaths + extra-packages: any::rcmdcheck needs: check - uses: r-lib/actions/check-r-package@v2 From dfcdd8cf7ae389a444feac4643c7afed15179e95 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Wed, 19 Mar 2025 05:34:41 -0600 Subject: [PATCH 08/12] Fixup library reference based on @cderv suggestion --- .github/workflows/R-CMD-check.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index b6ddb00f6..29c306577 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -56,8 +56,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - # extra-packages: any::rcmdcheck, quarto-dev/quarto-r@libpaths - extra-packages: any::rcmdcheck + extra-packages: any::rcmdcheck, quarto=quarto-dev/quarto-r@libpaths needs: check - uses: r-lib/actions/check-r-package@v2 From 5d863d85cf5d786bc30383ab92f761a71ebcfb48 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Wed, 19 Mar 2025 05:35:23 -0600 Subject: [PATCH 09/12] Install dev quarto The dev quarto version should appear in the regression test. --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 4b2031ab0..0e378c40c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -75,3 +75,4 @@ Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2.9000 SystemRequirements: pandoc +Remotes: quarto-dev/quarto-r@libpaths From 36e6e197b664b5afe84bf18a0a49ce1370f9b964 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Tue, 8 Jul 2025 12:10:33 -0500 Subject: [PATCH 10/12] Try with quarto 1.8 --- .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 29c306577..61d97f89a 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -58,6 +58,7 @@ jobs: with: extra-packages: any::rcmdcheck, quarto=quarto-dev/quarto-r@libpaths needs: check + quarto-version: 1.8.15 - uses: r-lib/actions/check-r-package@v2 env: From e58f8b7b8d1888e130e53a3bccc9eb8b59097b9a Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Wed, 9 Jul 2025 05:54:10 -0500 Subject: [PATCH 11/12] Update snapshot test --- tests/testthat/_snaps/build-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/_snaps/build-reference.md b/tests/testthat/_snaps/build-reference.md index e2719c4d3..59e9de3ff 100644 --- a/tests/testthat/_snaps/build-reference.md +++ b/tests/testthat/_snaps/build-reference.md @@ -18,5 +18,5 @@ Code cat(examples) Output - #> [1] 0.080750138 0.834333037 0.600760886 0.157208442 0.007399441 + #> [1] 0.600760886 0.157208442 0.007399441 0.466393497 0.497777389 From 528857e57da814568ab46003a7f77333c2754f73 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Mon, 20 Oct 2025 13:01:05 -0600 Subject: [PATCH 12/12] Update workflow --- .github/workflows/R-CMD-check.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 61d97f89a..1c8d8323a 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -56,13 +56,12 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::rcmdcheck, quarto=quarto-dev/quarto-r@libpaths + extra-packages: any::rcmdcheck, quarto=quarto-dev/quarto-r, local::. needs: check - quarto-version: 1.8.15 - uses: r-lib/actions/check-r-package@v2 env: - QUARTO_R_QUIET: FALSE + R_QUARTO_QUIET: FALSE with: upload-snapshots: true build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'