Skip to content

Commit

Permalink
Merge pull request #41 from Boehringer-Ingelheim/test_storing
Browse files Browse the repository at this point in the history
test_storing_fix
  • Loading branch information
zsigmas authored Sep 18, 2024
2 parents 6e992b1 + 64b1706 commit 633920c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
path: inst/validation/results

- name: Archive snap results ⬆️
if: always()
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: snap_results
path: tests/testthat/_snaps
path: snaps_archive

11 changes: 11 additions & 0 deletions scripts/test_qc_pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ test_results <- tibble::as_tibble(

success[["test"]] <- sum(test_results[["failed"]]) == 0

# Copy _snaps folder so it can be archived later for test debugging
# Empty if no errors are found
root <- Sys.getenv("GITHUB_WORKSPACE")
archive_folder <- file.path(root, "snaps_archive")
if (!dir.exists(archive_folder)) dir.create(archive_folder)

if (!success[["test"]]) {
snap_folder <- system.file("tests/testthat/_snaps", package = pkg_name, mustWork = TRUE)
file.copy(snap_folder, archive_folder, recursive = TRUE)
}

message("##########################")
message("###### TESTING (F) ######")
message("##########################")
Expand Down

0 comments on commit 633920c

Please sign in to comment.