Skip to content

Commit

Permalink
fix(ci): Ensure all dependencies and tests run correctly in test-cove…
Browse files Browse the repository at this point in the history
…rage workflow
  • Loading branch information
esloch committed May 17, 2024
1 parent eb1030c commit a695291
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ jobs:
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Check for missing packages
run: |
missing_pkgs <- setdiff(c("covr", "testthat"), rownames(installed.packages()))
if (length(missing_pkgs) > 0) {
cat("Missing packages:", paste(missing_pkgs, collapse = ", "), "\n")
install.packages(missing_pkgs)
} else {
cat("All required packages are installed.\n")
}
shell: Rscript {0}

- name: Run tests
run: |
testthat::test_local()
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
Expand Down

0 comments on commit a695291

Please sign in to comment.