Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
  • Loading branch information
schloerke and cpsievert authored May 17, 2024
1 parent 68d6f4c commit f32501a
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 56 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/apps-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/apps-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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
Expand All @@ -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
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/apps-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,34 @@ 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
with:
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
with:
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
with:
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
with:
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]
Expand All @@ -77,17 +67,13 @@ 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
with:
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
Expand All @@ -104,17 +90,13 @@ 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
with:
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]
Expand All @@ -123,44 +105,34 @@ 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
with:
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
with:
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
with:
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
with:
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
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/apps-test-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/deploy-apps.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 0 additions & 6 deletions R/install-path.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand Down
2 changes: 2 additions & 0 deletions inst/apps/000-pkg-versions/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit f32501a

Please sign in to comment.