Skip to content

trying new BiocCheck action format #1

trying new BiocCheck action format

trying new BiocCheck action format #1

# workflow derived from: https://github.com/insightsengineering/bioc-check-action
on:
push:
branches: dev
name: Bioc-check-new
jobs:
bioc-check:
runs-on: macos-latest
name: Bioc-check
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
http-user-agent: release
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
- name: Install dependencies
run: |
install.packages("BiocManager")
BiocManager::install("BiocCheck")
shell: Rscript {0}
- name: Run BiocCheck
run: |
bc_res <- BiocCheck::BiocCheck()
print(paste0("Errors": length(bc_res$error), "\n"))
print(paste0("Warnings": length(bc_res$warning), "\n"))
print(paste0("Notes": length(bc_res$note), "\n"))
n_errors <- length(bc_res$error)
Sys.setenv("BC_ERRORS" = n_errors)
shell: Rscript {0}
- name: Check BiocCheck results
run: |
if [[ $BC_ERRORS -gt 0 ]]; then exit 1; else echo "BiocCheck passed!"; fi
shell: bash