Version up #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Basic checks | |
on: [push] | |
env: | |
cache-version: v1 | |
repo-name: tidyomics/tidyomicsBlog | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
define-docker-info: | |
runs-on: ubuntu-latest | |
container: bioconductor/bioconductor_docker:devel | |
outputs: | |
imagename: ${{ steps.findinfo.outputs.imagename }} | |
steps: | |
- id: findinfo | |
name: Find Bioc release version to select Docker | |
run: | | |
## Define the Bioconductor release version RELEASE_x_y | |
biocrelease=$(Rscript -e "info <- BiocManager:::.version_map_get_online('https://bioconductor.org/config.yaml'); res <- subset(info, BiocStatus == 'release')[, 'Bioc']; res <- gsub('.', '_', res, fixed=TRUE); res <- gsub('^', 'RELEASE_', res); cat(as.character(res))") | |
## Print the results | |
echo $biocrelease | |
## Define the image name and print the information | |
imagename="bioconductor/bioconductor_docker:${biocrelease}" | |
echo $imagename | |
## Save the info for the next job | |
echo "::set-output name=imagename::${imagename}" | |
shell: | |
bash {0} | |
install-packages: | |
runs-on: ubuntu-latest | |
needs: define-docker-info | |
## The docker container to use. Note that we link a directory on the GHA | |
## runner to a docker directory, such that we can then cache the linked | |
## directory. This directory will contain the R packages used. | |
container: | |
image: ${{ needs.define-docker-info.outputs.imagename }} | |
volumes: | |
- /home/runner/work/_temp/Library:/usr/local/lib/R/host-site-library | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Query dependencies and update old packages | |
run: | | |
BiocManager::install(ask=FALSE) | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
shell: Rscript {0} | |
- name: Cache R packages | |
if: runner.os != 'Windows' | |
uses: actions/cache@v1 | |
with: | |
path: /usr/local/lib/R/site-library | |
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ hashFiles('.github/depends.Rds') }} | |
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r- | |
# This lets us augment with additional dependencies | |
- name: Install system dependencies | |
if: runner.os == 'Linux' | |
env: | |
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc | |
run: | | |
sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))') | |
echo $sysreqs | |
sudo -s eval "$sysreqs" | |
- name: Install dependencies | |
run: | | |
options(repos = c(CRAN = "https://cran.r-project.org")) | |
BiocManager::repositories() | |
## To fix preprocessCore error https://github.com/stemangiola/tidybulk/issues/145 | |
BiocManager::install("preprocessCore", configure.args="--disable-threading") | |
remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories()) | |
remotes::install_cran("rcmdcheck") | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_CRAN_INCOMING_REMOTE_: false | |
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check") | |
shell: Rscript {0} | |