Skip to content

BiocCheck: only fail on errors, allow warnings #4

BiocCheck: only fail on errors, allow warnings

BiocCheck: only fail on errors, allow warnings #4

Workflow file for this run

name: BiocCheck
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
BiocCheck:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev
- name: Install BiocManager and BiocCheck
run: |
install.packages("BiocManager", repos = "https://cloud.r-project.org")
BiocManager::install("BiocCheck", update = FALSE, ask = FALSE)
shell: Rscript {0}
- name: Install package dependencies
run: |
BiocManager::install(c("remotes"), update = FALSE, ask = FALSE)
remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories())
shell: Rscript {0}
- name: Run BiocCheck (warnings allowed)
run: |
result <- BiocCheck::BiocCheck(
".",
`quit-with-status` = FALSE,
`no-check-bioc-help` = TRUE
)
# Print summary
cat("\n\n=== BiocCheck Summary ===\n")
print(result)
# Only fail on ERRORs, not WARNINGs
if (length(result$error) > 0) {
cat("\n\nERRORS found:\n")
print(result$error)
quit(status = 1)
} else {
cat("\n\nNo critical errors. Package ready for submission.\n")
}
shell: Rscript {0}