Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,32 @@ jobs:
extra-packages: any::covr any::reticulate
cache-version: 1

# install_path must live outside the R session tempdir: R deletes its
# own Rtmp* directory when the process exits (clean = FALSE does not
# prevent that), which used to take testthat.Rout.fail with it.
- name: Run test coverage
shell: Rscript {0}
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "covr-install")
)

# covr runs the test suite via tools::testInstalledPackage, which writes
# test output only to testthat.Rout(.fail) inside its install library --
# the job log otherwise shows nothing but "running the tests failed",
# making CI failures undiagnosable. Surface the file on failure.
- name: Show testthat output on failure
if: failure()
shell: bash
run: |
found=0
while IFS= read -r f; do
found=1
echo "=== $f ==="
tail -n 500 "$f"
done < <(find "$RUNNER_TEMP/covr-install" /tmp -name 'testthat.Rout*' 2>/dev/null)
if [ "$found" -eq 0 ]; then
echo "No testthat.Rout* files found"
fi
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ inst/bin/scconvert
inst/bin/scconvert.exe
inst/bin/*.dll
vignettes/cosmx_lung9

# gcov coverage artifacts (covr / --coverage builds)
src/*.gcda
src/*.gcno
src/cli_obj/*.gcda
src/cli_obj/*.gcno
5 changes: 5 additions & 0 deletions tests/scverse-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ dependencies:
- squidpy>=1.3
- mudata>=0.2
- loompy>=3.0
# sc.tl.leiden dependencies: conda-forge scanpy does not depend on these,
# so they must be pinned explicitly. They used to arrive transitively and
# vanished when the CI env cache expired and conda-forge re-solved.
- python-igraph
- leidenalg
- numpy
- pandas
- scipy
Expand Down
Loading