From f32501aa17c8d247d9aa36547c32a889c2e8958b Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Fri, 17 May 2024 16:15:56 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Carson Sievert --- .github/workflows/apps-config.yml | 9 --------- .github/workflows/apps-deploy.yml | 5 ----- .github/workflows/apps-test-matrix.yml | 28 -------------------------- .github/workflows/apps-test-os.yml | 6 ------ R/deploy-apps.R | 2 +- R/install-path.R | 6 ------ README.Rmd | 2 +- inst/apps/000-pkg-versions/app.R | 2 ++ 8 files changed, 4 insertions(+), 56 deletions(-) diff --git a/.github/workflows/apps-config.yml b/.github/workflows/apps-config.yml index 320faf2928..4ab793ce16 100644 --- a/.github/workflows/apps-config.yml +++ b/.github/workflows/apps-config.yml @@ -16,15 +16,6 @@ on: ubuntu: description: ubuntu OS value value: "ubuntu-20.04" - ubuntu-packagemanager-cran-url: - description: ubuntu packagemanager url to be used for CRAN installations - value: "https://packagemanager.posit.co/cran/__linux__/focal/latest" - packagemanager-cran-url: - description: packagemanager url to be used for CRAN installations - value: "https://packagemanager.posit.co/cran/latest" - shinyverse-cran-url: - description: CRAN url to be used for shinyverse installations via r-universe - value: "https://posit-dev-shinycoreci.r-universe.dev" cache-version: description: cache-version to be used when pulling library cache value: "5" diff --git a/.github/workflows/apps-deploy.yml b/.github/workflows/apps-deploy.yml index 3e1a8f6ec3..d65841f3ae 100644 --- a/.github/workflows/apps-deploy.yml +++ b/.github/workflows/apps-deploy.yml @@ -37,7 +37,6 @@ jobs: cores: 5 retry: 3 # extra_app_text: ", apps = c('000-all', '000-manual', '300-bs-themer')" - packagemanager-cran-url: ${{ needs.config.outputs.ubuntu-packagemanager-cran-url }} - os: "${{ needs.config.outputs.ubuntu }}" r: "${{ needs.config.outputs.oldrel1 }}" @@ -48,7 +47,6 @@ jobs: cores: 1 retry: 3 # extra_app_text: ", apps = c('000-all', '000-manual', '300-bs-themer')" - packagemanager-cran-url: ${{ needs.config.outputs.ubuntu-packagemanager-cran-url }} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -70,9 +68,6 @@ jobs: with: r-version: ${{ matrix.config.r }} cache-version: deploy-2-${{ needs.config.outputs.cache-version }} - # extra-packages: rstudio/rsconnect - packagemanager-cran-url: ${{ matrix.config.packagemanager-cran-url}} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} # Perform as second step to make sure this version is installed - name: Install shinycoreci from GitHub diff --git a/.github/workflows/apps-test-matrix.yml b/.github/workflows/apps-test-matrix.yml index 0278ef3c20..0e9b6b9dd9 100644 --- a/.github/workflows/apps-test-matrix.yml +++ b/.github/workflows/apps-test-matrix.yml @@ -31,8 +31,6 @@ jobs: r-version: ${{ needs.config.outputs.release }} os: ${{ needs.config.outputs.macos }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} macos-oldrel-1: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -40,8 +38,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel1 }} os: ${{ needs.config.outputs.macos }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} macos-oldrel-2: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -49,8 +45,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel2 }} os: ${{ needs.config.outputs.macos }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} macos-oldrel-3: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -58,8 +52,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel3 }} os: ${{ needs.config.outputs.macos }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} macos-oldrel-4: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -67,8 +59,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel4 }} os: ${{ needs.config.outputs.macos }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} ubuntu-release: needs: [config] @@ -77,8 +67,6 @@ jobs: r-version: ${{ needs.config.outputs.release }} os: ${{ needs.config.outputs.ubuntu }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.ubuntu-packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} ubuntu-oldrel-1: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -86,8 +74,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel1 }} os: ${{ needs.config.outputs.ubuntu }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.ubuntu-packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} ubuntu-oldrel-2: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -104,8 +90,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel3 }} os: ${{ needs.config.outputs.ubuntu }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.ubuntu-packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} ubuntu-oldrel-4: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -113,8 +97,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel4 }} os: ${{ needs.config.outputs.ubuntu }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.ubuntu-packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} windows-release: needs: [config] @@ -123,8 +105,6 @@ jobs: r-version: ${{ needs.config.outputs.release }} os: ${{ needs.config.outputs.windows }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} windows-oldrel-1: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -132,8 +112,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel1 }} os: ${{ needs.config.outputs.windows }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} windows-oldrel-2: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -141,8 +119,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel2 }} os: ${{ needs.config.outputs.windows }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} windows-oldrel-3: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -150,8 +126,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel3 }} os: ${{ needs.config.outputs.windows }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} windows-oldrel-4: needs: [config] uses: ./.github/workflows/apps-test-os.yml @@ -159,8 +133,6 @@ jobs: r-version: ${{ needs.config.outputs.oldrel4 }} os: ${{ needs.config.outputs.windows }} cache-version: ${{ needs.config.outputs.cache-version }} - packagemanager-cran-url: ${{ needs.config.outputs.packagemanager-cran-url }} - shinyverse-cran-url: ${{ needs.config.outputs.shinyverse-cran-url }} build-results: uses: ./.github/workflows/build-results.yml diff --git a/.github/workflows/apps-test-os.yml b/.github/workflows/apps-test-os.yml index dc500fd668..cc6664573b 100644 --- a/.github/workflows/apps-test-os.yml +++ b/.github/workflows/apps-test-os.yml @@ -29,11 +29,6 @@ on: type: string default: "3.x" required: false - packagemanager-cran-url: - type: string - description: packagemanager url to be used for CRAN installations - default: "https://packagemanager.posit.co/cran/latest" - required: false # rtools-35: # type: boolean # default: true @@ -135,7 +130,6 @@ jobs: http-user-agent: ${{ inputs.http-user-agent }} pandoc-version: ${{ inputs.pandoc-version }} extra-packages: ${{ inputs.extra-packages }} - packagemanager-cran-url: ${{ inputs.packagemanager-cran-url }} # Install packages as necessary! - name: Run tests diff --git a/R/deploy-apps.R b/R/deploy-apps.R index 9d4ea061f5..56a8bedfc9 100644 --- a/R/deploy-apps.R +++ b/R/deploy-apps.R @@ -18,7 +18,7 @@ deploy_apps <- function( account = "testing-apps", server = "shinyapps.io", ..., - local_pkgs = TRUE, + local_pkgs = FALSE, extra_packages = NULL, cores = 1, retry = 2, diff --git a/R/install-path.R b/R/install-path.R index c1ccab7cd1..26ad539713 100644 --- a/R/install-path.R +++ b/R/install-path.R @@ -7,12 +7,6 @@ on_ci <- function() { #' @keywords internal resolve_libpath <- function(..., local_pkgs = FALSE) { stopifnot(length(list(...)) == 0) - # # CI cache location; Use standard libpath on CI to avoid installing the shinyverse twice - # if (on_ci()) { - # # Use standard libpath location - # return(.libPaths()[1]) - # } - # If using local_pkgs, use the standard libpath location libpath <- if (isTRUE(local_pkgs)) .libPaths()[1] else shinycoreci_libpath() libpath diff --git a/README.Rmd b/README.Rmd index ce3c3ceced..87c1095a4b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -71,7 +71,7 @@ cat( #### R-Universe -`{shinycoreci}` testing leverages rOpenScie [`r-universe`](https://r-universe.dev/search/), specifically the [`posit-dev-shinycoreci`](https://posit-dev-shinycoreci.r-universe.dev/builds) universe. This universe is used to install the latest development versions of the Shiny related packages (updated hourly) used in the testing apps without the need for a GitHub token. This last detail is important, as it allows GitHub Actions to install packages freely without the worry of being rate limited. This gives us the ability to attempt to install each app's dependencies independently, leading to higher test coverage as a single dependencies does not block the entire test execution. +`{shinycoreci}` testing leverages rOpenSci [`r-universe`](https://r-universe.dev/search/), specifically the [`posit-dev-shinycoreci`](https://posit-dev-shinycoreci.r-universe.dev/builds) universe. This universe is used to install the latest development versions of the Shiny related packages (updated hourly) used in the testing apps without the need for a GitHub token. This last detail is important, as it allows GitHub Actions to install packages freely without the worry of being rate limited. This gives us the ability to attempt to install each app's dependencies independently, leading to higher test coverage as a single dependencies does not block the entire test execution. diff --git a/inst/apps/000-pkg-versions/app.R b/inst/apps/000-pkg-versions/app.R index f05d0e8533..815a7c2dc0 100644 --- a/inst/apps/000-pkg-versions/app.R +++ b/inst/apps/000-pkg-versions/app.R @@ -77,6 +77,8 @@ server <- function(input, output, session) { # ---------------------------- + # Packages inside `dt` are in the shinyverse so if there remote location is + # not the universe url, then they're not properly installed. bad_dt <- dt %>% filter(!is.na(remoteRepos)) %>% filter(remoteRepos != universe_url) output$pkg_from_universe <- renderUI({