Skip to content

Better handling of object and attribute names in context plots. #134

Better handling of object and attribute names in context plots.

Better handling of object and attribute names in context plots. #134

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: test-coverage
jobs:
test-coverage:
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', bioc: '3.18'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- run: tlmgr --version
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
message(paste('****', Sys.time(), 'installing BiocManager ****'))
remotes::install_cran("BiocManager")
shell: Rscript {0}
## Find the corresponding R version based on the Bioconductor version
## to use for the macOS and Windows checks by the next GHA job
- id: findrversion
name: Find Bioc and R versions
run: |
## Find what branch we are working on
if echo "$GITHUB_REF" | grep -q "master"; then
biocversion="devel"
elif echo "$GITHUB_REF" | grep -q "RELEASE_"; then
biocversion="release"
fi
## Define the R and Bioconductor version numbers
biocversionnum=$(Rscript -e "info <- BiocManager:::.version_map_get_online('https://bioconductor.org/config.yaml'); res <- subset(info, BiocStatus == '${biocversion}')[, 'Bioc']; cat(as.character(res))")
rversion=$(Rscript -e "info <- BiocManager:::.version_map_get_online('https://bioconductor.org/config.yaml'); res <- subset(info, BiocStatus == '${biocversion}')[, 'R']; cat(as.character(res))")
## Print the results
echo $biocversion
echo $biocversionnum
echo $rversion
## Save the info for the next job
echo "rversion=${rversion}" >> $GITHUB_OUTPUT
echo "biocversionnum=${biocversionnum}" >> $GITHUB_OUTPUT
# echo "::set-output name=rversion::${rversion}"
# echo "::set-output name=biocversionnum::${biocversionnum}"
shell:
bash {0}
- name: Set BiocVersion
run: |
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, update = FALSE)
shell: Rscript {0}
- name: Install dependencies
run: |
install.packages(c("remotes"))
# remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr", type = "binary", dependencies = TRUE)
## remotes::install_deps(dependencies = TRUE)
## remotes::install_cran("rcmdcheck")
### Try installing the package dependencies in steps. First the local
## dependencies, then any remaining dependencies to avoid the
## issues described at
## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html
## https://github.com/r-lib/remotes/issues/296
## Ideally, all dependencies should get installed in the first pass.
## Pass #1 at installing dependencies
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
local_deps <- remotes::local_package_deps(dependencies = TRUE)
deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
# BiocManager::install(local_deps[local_deps %in% deps$package[deps$diff != 0]])
BiocManager::install(local_deps, force = TRUE)
## Pass #2 at installing dependencies
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
deps <- remotes::dev_package_deps(dependencies = TRUE, repos = BiocManager::repositories())
BiocManager::install(deps$package[deps$diff != 0])
## For running the checks
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
remotes::install_cran("rcmdcheck")
BiocManager::install("BiocCheck")
shell: Rscript {0}
- name: Test coverage
run: covr::codecov()
shell: Rscript {0}