Skip to content

Commit

Permalink
fix(code-coverage): Correctly find coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Jul 19, 2024
1 parent bdbd25a commit ddc3f6d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ jobs:
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
saveRDS(coverage, "coverage_results.Rda")
saveRDS(coverage, "coverage_results.rds")
shell: Rscript {0}

- name: Upload Coverage Report Artifact
uses: actions/upload-artifact@v2
with:
name: coverage-${{ matrix.config.id }}
path: coverage_results.Rda
path: coverage_results.rds

- name: Show testthat output
if: always()
Expand Down Expand Up @@ -151,14 +151,14 @@ jobs:
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
saveRDS(coverage, "coverage_results.Rda")
saveRDS(coverage, "coverage_results.rds")
shell: Rscript {0}

- name: Upload Coverage Report Artifact
uses: actions/upload-artifact@v2
with:
name: coverage-duckdb
path: coverage_results.Rda
path: coverage_results.rds

- name: Show testthat output
if: always()
Expand Down Expand Up @@ -238,14 +238,14 @@ jobs:
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
saveRDS(coverage, "coverage_results.Rda")
saveRDS(coverage, "coverage_results.rds")
shell: Rscript {0}

- name: Upload Coverage Report Artifact
uses: actions/upload-artifact@v2
with:
name: coverage-postgres
path: coverage_results.Rda
path: coverage_results.rds

- name: Show testthat output
if: always()
Expand Down Expand Up @@ -358,14 +358,14 @@ jobs:
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
saveRDS(coverage, "coverage_results.Rda")
saveRDS(coverage, "coverage_results.rds")
shell: Rscript {0}

- name: Upload Coverage Report Artifact
uses: actions/upload-artifact@v2
with:
name: coverage-sql-server
path: coverage_results.Rda
path: coverage_results.rds

- name: Show testthat output
if: always()
Expand Down Expand Up @@ -428,9 +428,8 @@ jobs:

- name: Combine Coverage Reports and upload to codecov.io
run: |
files <- list.files("coverage-reports", full.names = TRUE, pattern = "\\.Rda$", recursive = TRUE)
files <- list.files("coverage-reports", full.names = TRUE, pattern = "\\.rds$", recursive = TRUE)
print(files)
coverages <- purrr::map(files, readRDS)
combined_coverage <- purrr::reduce(coverages, c)
Expand Down

0 comments on commit ddc3f6d

Please sign in to comment.