Skip to content

Workflow that tests the actions #58

Workflow that tests the actions

Workflow that tests the actions #58

on:
workflow_dispatch:
name: Workflow that tests the actions
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
jobs:
pkg-at-root:
name: Root Pkg - Bioc ${{ matrix.bioc-version }} (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022, macos-11, macos-12, macos-13, macos-14]
## Test using both Bioconductor devel and release
bioc-version: [devel, release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
with:
bioc-version: ${{ matrix.bioc-version }}
bioc-mirror: https://ftp.gwdg.de/pub/misc/bioconductor
use-public-rspm: false
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
- name: Build, Install, Check
id: build-install-check
uses: grimbough/bioc-actions/build-install-check@v1
with:
package-directory: '.'
## Turn off the checks that we know will fail
## Cause the workflow to error if any new errors appear
- name: Run BiocCheck with arguments
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
package-directory: '.'
arguments: '--no-check-bioc-views --no-check-vignettes --no-check-bioc-help'
error-on: 'error'
## upload the Rcheck folder regardless of success of failure
- name: Upload output
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}-bioc-${{ matrix.bioc-version}}-Rcheck
path: |
${{ steps.build-install-check.outputs.check-dir }}
## upload source and binary packages
- name: Upload check output
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-bioc-${{ matrix.bioc-version}}-pkgs
path: |
${{ steps.build-install-check.outputs.source-tarball }}
${{ steps.build-install-check.outputs.package-binary }}
pkg-in-subfolder:
name: Subfolder Pkg - Bioc ${{ matrix.bioc-version }} (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
bioc-version: [release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
## We only using Ubuntu and BioC-release here,
## so lets use the Rstudio package manager
## to install binary linux packages
- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
with:
bioc-version: ${{ matrix.bioc-version }}
bioc-mirror: https://packagemanager.rstudio.com/bioconductor
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
## Run the complete build, install, check process like the Bioc Build System
- name: Build, Install, Check
id: build-install-check
uses: grimbough/bioc-actions/build-install-check@v1
with:
package-directory: 'inst/nestedPKG'
## Run all tests in BiocCheck, include those we know fail
## Use the 'error-on' to prevent this failing the workflow
- name: Run BiocCheck without arguments
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
package-directory: 'inst/nestedPKG'
error-on: 'never'
## upload the Rcheck folder if the workflow fails
- name: Upload output
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os }}-bioc-${{ matrix.bioc-version}}-sub_folder
path: |
${{ steps.build-install-check.outputs.check-dir }}
using-bioc-docker:
name: Docker Devel
strategy:
fail-fast: false
runs-on: ubuntu-22.04
container: bioconductor/bioconductor_docker:devel
steps:
- uses: actions/checkout@v4
##################################################
## no need to install R, BiocManager, or Pandoc ##
##################################################
## cache installed packages
- name: Cache install R packages
uses: actions/cache@v3
with:
path: /usr/local/lib/R/site-library
key: docker-1
restore-keys: docker-
## we can use BiocManager will install binary packages in the Docker container
- name: Install dependencies
run: |
BiocManager::install(c('AnnotationHub', 'rtracklayer', 'knitr', 'rmarkdown', 'BiocStyle'))
shell: Rscript {0}
- name: Build, Install, Check
id: build-install-check
uses: grimbough/bioc-actions/build-install-check@v1
with:
package-directory: '.'
## Turn off the checks that we know will fail
## Cause the workflow to error if any new errors appear
- name: Run BiocCheck with arguments
uses: grimbough/bioc-actions/run-BiocCheck@v1
with:
package-directory: '.'
arguments: '--no-check-bioc-views --no-check-vignettes --no-check-bioc-help'
error-on: 'error'
- name: Upload built package binary
uses: actions/upload-artifact@v4
with:
name: docker-binary
path: |
${{ steps.build-install-check.outputs.package-binary }}