rstudio / shinycoreci-apps

SUPERSEDED - Apps for Shiny continuous integration testing
Other
36 stars 4 forks source link

GHA: runTests failing with an error #132

Closed MadhulikaTanuboddi closed 3 years ago

MadhulikaTanuboddi commented 3 years ago

From the GHA review on March 31; https://github.com/rstudio/shinycoreci-apps/actions/runs/704248695, noticed that "runTests" job is failing on most of the builds with the following log and error

Run options(install.packages.check.source = 'no')
  options(install.packages.check.source = 'no')
  dir <- "apps"
  apps <- shinycoreci::apps_runtests(dir)
  is_pull_request <- isTRUE(jsonlite::parse_json("false"))
  if (is_pull_request) {
    # reduce apps to only changed apps
    files_changed <- jsonlite::parse_json('', simplifyVector = TRUE)
    changed_app_folders <-
      Filter(strsplit(files_changed, "/"), f = function(item) {
        identical(item[[1]], "apps") &&
        dir.exists(file.path(item[[1]], item[[2]]))
      })
    unique_changed_apps <- unique(unlist(lapply(changed_app_folders, `[[`, 2)))
    apps <- apps[apps %in% unique_changed_apps]
    cat("Only checking changed apps:\n", paste0("* ", apps, "\n"))
    if (length(apps) == 0) stop("No apps to check")
  }
  run_tests_output <- shinycoreci::test_runtests(
    dir = dir,
    apps = apps,
    retries = 1,
    assert = FALSE,
    update_pkgs = FALSE,
    update_app_pkgs = TRUE
  )
  shinycoreci::save_test_results(run_tests_output, gha_branch_name = 'gha-ad7b738-2021_03_31_08_30-4.0-macOS', pr_number = '', username = '${GITHUB_ACTOR}')
  shinycoreci::assert_runtests(run_tests_output)
  shell: /usr/local/bin/Rscript {0}
  env:
    R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
    RSPM: 
    GITHUB_PAT: ***
    R_LIBS_USER: /Users/runner/work/_temp/Library
    TZ: UTC
    _R_CHECK_SYSTEM_CLOCK_: FALSE
    NOT_CRAN: true
    WDM_GITHUBTOKENNAME: schloerke
    WDM_GITHUBTOKENSECRET: ***
Error: Error in if (nchar(version) > 0) { : argument is of length zero
Calls: <Anonymous> -> write_sysinfo -> req_pkg
Execution halted
Error: Process completed with exit code 1.

Not sure if its just a glitch. I will double check how this looks in the next run. But, just adding this issue for tracking (incase if something needs to be fixed)

schloerke commented 3 years ago

The error is consistent.

Hopefully fixed here: https://github.com/rstudio/shinycoreci/commit/a7fbcca5a90e27cfe6337bf9622c0d3f92f7913e

It made it past the original failure point in macOS 4.0 here: https://github.com/rstudio/shinycoreci-apps/runs/2254301629?check_suite_focus=true

Going to close.