Skip to content

Commit 79bef77

Browse files
committed
fix codecov
1 parent 14982bd commit 79bef77

1 file changed

Lines changed: 22 additions & 36 deletions

File tree

‎.github/workflows/dsBaseClient_test_suite.yaml‎

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -231,36 +231,29 @@ jobs:
231231
R -q -e "library(opalr); opal <- opal.login('administrator', 'datashield_test&', url='http://localhost:8080/'); dsadmin.set_option(opal, 'default.datashield.privacyControlLevel', 'permissive'); opal.logout(opal)"
232232
working-directory: dsBaseClient/tests/testthat/data_files
233233

234-
- name: Run dsBase tests with JUnit report
234+
- name: Run dsBase tests with coverage & JUnit report
235235
run: |
236236
R -q -e "devtools::reload();"
237-
R -q -e '
238-
output_file <- file("test_console_output_dsbase.txt");
239-
sink(output_file, split = TRUE);
240-
junit_rep <- testthat::JunitReporter$new(file = file.path(getwd(), "test_results_dsbase.xml"));
241-
progress_rep <- testthat::ProgressReporter$new(max_failures = 999999);
242-
multi_rep <- testthat::MultiReporter$new(reporters = list(progress_rep, junit_rep));
243-
options("datashield.return_errors" = FALSE, "default_driver" = "${{ env.DS_DRIVER }}");
244-
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ matrix.filter }}", reporter = multi_rep, stop_on_failure = FALSE)' || R_EXIT=$?
245-
cat test_console_output_dsbase.txt
246-
exit "${R_EXIT:-0}"
247-
working-directory: dsBaseClient
248-
249-
- name: Generate dsBase coverage report
250-
run: |
251237
R -q -e '
252238
write.csv(
253239
covr::coverage_to_list(
254240
covr::package_coverage(
255-
type = "none",
241+
type = c("none"),
256242
code = c('"'"'
243+
output_file <- file("test_console_output_dsbase.txt");
244+
sink(output_file, split = TRUE);
245+
junit_rep <- testthat::JunitReporter$new(file = file.path(getwd(), "test_results_dsbase.xml"));
246+
progress_rep <- testthat::ProgressReporter$new(max_failures = 999999);
247+
multi_rep <- testthat::MultiReporter$new(reporters = list(progress_rep, junit_rep));
257248
options("datashield.return_errors" = FALSE, "default_driver" = "${{ env.DS_DRIVER }}");
258-
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ matrix.filter }}", reporter = "silent", stop_on_failure = FALSE)'"'"'
249+
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ matrix.filter }}", reporter = multi_rep, stop_on_failure = FALSE)'"'"'
259250
)
260251
)
261252
),
262253
"coveragelist.csv"
263-
)'
254+
)' || R_EXIT=$?
255+
cat test_console_output_dsbase.txt
256+
exit "${R_EXIT:-0}"
264257
working-directory: dsBaseClient
265258

266259
- name: Upload shard results
@@ -746,36 +739,29 @@ jobs:
746739
run: grep "Caused by:" armadillo_home/logs/stdout.log | sort -u
747740
working-directory: dsBaseClient
748741

749-
- name: Run dsBase tests with JUnit report
742+
- name: Run dsBase tests with coverage & JUnit report
750743
run: |
751744
R -q -e "devtools::reload();"
752-
R -q -e '
753-
output_file <- file("test_console_output_dsbase.txt");
754-
sink(output_file, split = TRUE);
755-
junit_rep <- testthat::JunitReporter$new(file = file.path(getwd(), "test_results_dsbase.xml"));
756-
progress_rep <- testthat::ProgressReporter$new(max_failures = 999999);
757-
multi_rep <- testthat::MultiReporter$new(reporters = list(progress_rep, junit_rep));
758-
options("datashield.return_errors" = FALSE, "default_driver" = "${{ env.DS_DRIVER }}");
759-
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ matrix.filter }}", reporter = multi_rep, stop_on_failure = FALSE)' || R_EXIT=$?
760-
cat test_console_output_dsbase.txt
761-
exit "${R_EXIT:-0}"
762-
working-directory: dsBaseClient
763-
764-
- name: Generate dsBase coverage report
765-
run: |
766745
R -q -e '
767746
write.csv(
768747
covr::coverage_to_list(
769748
covr::package_coverage(
770-
type = "none",
749+
type = c("none"),
771750
code = c('"'"'
751+
output_file <- file("test_console_output_dsbase.txt");
752+
sink(output_file, split = TRUE);
753+
junit_rep <- testthat::JunitReporter$new(file = file.path(getwd(), "test_results_dsbase.xml"));
754+
progress_rep <- testthat::ProgressReporter$new(max_failures = 999999);
755+
multi_rep <- testthat::MultiReporter$new(reporters = list(progress_rep, junit_rep));
772756
options("datashield.return_errors" = FALSE, "default_driver" = "${{ env.DS_DRIVER }}");
773-
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ matrix.filter }}", reporter = "silent", stop_on_failure = FALSE)'"'"'
757+
testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ matrix.filter }}", reporter = multi_rep, stop_on_failure = FALSE)'"'"'
774758
)
775759
)
776760
),
777761
"coveragelist.csv"
778-
)'
762+
)' || R_EXIT=$?
763+
cat test_console_output_dsbase.txt
764+
exit "${R_EXIT:-0}"
779765
working-directory: dsBaseClient
780766

781767
- name: Upload shard results

0 commit comments

Comments
 (0)