Skip to content

code coverage

code coverage #365

Workflow file for this run

name: code coverage
on:
push:
branches: [ "dev2" ]
schedule:
- cron: '16 20 * * 2'
jobs:
test-coverage:
name: Code coverage
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo for workflow access
uses: actions/checkout@v4
with:
ref: dev
- name: Set up R environment
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Set up dependencies (general)
uses: r-lib/actions/setup-r-dependencies@v2
env:
_R_CHECK_FORCE_SUGGESTS: false
_R_CHECK_RD_XREFS: false
with:
dependencies: '"hard"' # do not use suggested dependencies
install-pandoc: false
extra-packages: |
github::drieslab/GiottoData
any::covr
any::rcmdcheck
any::testthat
any::rlang
any::R.utils
any::knitr
any::rmarkdown
any::qs
any::sp
any::stars
any::raster
any::sf
any::scattermore
any::exactextractr
any::RTriangle
any::geometry
any::qs
any::future.apply
any::Biobase
any::chihaya
any::DelayedArray
any::DelayedMatrixStats
any::HDF5Array
any::plotly
any::rgl
any::rhdf5
any::S4Vectors
any::ScaledMatrix
any::XML
any::Seurat
any::SeuratObject
any::SingleCellExperiment
any::SpatialExperiment
any::STexampleData
any::SummarizedExperiment
needs: coverage
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: setup giotto_env
shell: Rscript {0}
run: |
if (!GiottoClass::checkGiottoEnvironment()) {
GiottoClass::installGiottoEnvironment()
}
reticulate::conda_install(
envname = 'giotto_env',
packages = 'scanpy',
pip = TRUE
)
path_to_python <- GiottoClass::set_giotto_python_path()
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
Sys.getenv("GITHUB_ENV"))
- name: Generate coverage report
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: 4c596b03-f583-4114-8c3a-f89ed373c53b
fail_ci_if_error: false
flags: unittests
verbose: true