From ceffdf53069b8470845bd7980689d6d36e53b442 Mon Sep 17 00:00:00 2001 From: rh Date: Sat, 22 Aug 2026 10:34:56 +0200 Subject: [PATCH 1/2] Call the shared CTTIR workflows Replaces copied R-CMD-check and test-coverage YAML with caller stubs and adds the house lint workflow. Behaviour that comes with the shared versions: an oldrel-3 job so the R version DESCRIPTION claims is actually built, --as-cran, a coverage gate computed with covr and an explicit exit rather than delegated to Codecov, and fail_ci_if_error on upload. Coverage floor is 0 for now - this fixes the measurement, not the gate. Lint is report-only. --- .github/workflows/R-CMD-check.yaml | 70 +++------------------------- .github/workflows/lint.yaml | 32 ++----------- .github/workflows/test-coverage.yaml | 63 +++---------------------- 3 files changed, 18 insertions(+), 147 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 6ef81f7..d586089 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,3 +1,5 @@ +# Calls the shared CTTIR workflow. Do not add steps here - change the +# shared one at CTTIR/.github so every package moves together. on: push: branches: [main, master] @@ -10,66 +12,8 @@ permissions: read-all jobs: R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: macOS-latest, r: 'release'} - - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - _R_CHECK_FORCE_SUGGESTS_: false - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - - name: Install Bioconductor Suggests (optional) - run: | - if (!requireNamespace("BiocManager", quietly = TRUE)) - install.packages("BiocManager") - bioc_pkgs <- c("DESeq2", "edgeR", "limma", "ShortRead", "Biostrings", - "Rsamtools", "GenomicAlignments", "GenomicFeatures", - "GenomicRanges", "SummarizedExperiment", "Biobase", - "ComplexHeatmap") - # Only install packages that are actually in Suggests - desc_suggests <- strsplit(read.dcf("DESCRIPTION")[, "Suggests"], ",\\s*")[[1]] - desc_suggests <- trimws(gsub("\\s*\\(.*\\)", "", desc_suggests)) - to_install <- intersect(bioc_pkgs, desc_suggests) - if (length(to_install) > 0) { - message("Installing Bioconductor packages: ", paste(to_install, collapse = ", ")) - tryCatch( - BiocManager::install(to_install, update = FALSE), - error = function(e) message("Bioconductor install skipped: ", e$message) - ) - } else { - message("No Bioconductor Suggests found — skipping.") - } - shell: Rscript {0} - continue-on-error: true - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true - build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' + uses: CTTIR/.github/.github/workflows/R-CMD-check.yaml@main + with: + # Suggests Bioconductor packages that pak cannot solve without the + # Bioconductor repository declared. + bioc-repository: true diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a11e12f..c1ccbce 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,31 +10,7 @@ permissions: read-all jobs: lint: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::lintr, any::goodpractice - needs: lint - - - name: Lint - run: lintr::lint_package() - shell: Rscript {0} - env: - LINTR_ERROR_ON_LINT: true - - - name: Good practice (informational) - run: | - gp <- goodpractice::gp() - print(gp) - shell: Rscript {0} - continue-on-error: true + uses: CTTIR/.github/.github/workflows/lint.yaml@main + with: + # Report-only until this package house-linter count reaches zero. + blocking: false diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index dc4b5cb..bb19507 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -10,59 +10,10 @@ permissions: read-all jobs: test-coverage: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - _R_CHECK_FORCE_SUGGESTS_: false - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::covr, any::xml2 - needs: coverage - - - name: Install Bioconductor Suggests (optional) - run: | - if (!requireNamespace("BiocManager", quietly = TRUE)) - install.packages("BiocManager") - bioc_pkgs <- c("DESeq2", "edgeR", "limma", "ShortRead", "Biostrings", - "Rsamtools", "GenomicAlignments", "GenomicFeatures", - "GenomicRanges", "SummarizedExperiment", "Biobase", - "ComplexHeatmap") - desc_suggests <- strsplit(read.dcf("DESCRIPTION")[, "Suggests"], ",\\s*")[[1]] - desc_suggests <- trimws(gsub("\\s*\\(.*\\)", "", desc_suggests)) - to_install <- intersect(bioc_pkgs, desc_suggests) - if (length(to_install) > 0) { - message("Installing Bioconductor packages: ", paste(to_install, collapse = ", ")) - tryCatch( - BiocManager::install(to_install, update = FALSE), - error = function(e) message("Bioconductor install skipped: ", e$message) - ) - } else { - message("No Bioconductor Suggests found — skipping.") - } - shell: Rscript {0} - continue-on-error: true - - - name: Test coverage - run: | - cov <- covr::package_coverage( - quiet = FALSE, - clean = FALSE, - install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") - ) - covr::to_cobertura(cov) - shell: Rscript {0} - - - uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: ${{ github.event_name != 'pull_request' }} - file: ./cobertura.xml - plugin: noop - token: ${{ secrets.CODECOV_TOKEN }} + uses: CTTIR/.github/.github/workflows/test-coverage.yaml@main + with: + # Report-only for now. The shared workflow computes coverage with covr + # and an explicit exit rather than delegating the gate to Codecov; + # set a real floor once this package is re-baselined. + floor: 0 + secrets: inherit From e81ed054835516db80646be2ee3d5b4e2153086f Mon Sep 17 00:00:00 2001 From: rh Date: Sat, 22 Aug 2026 15:00:23 +0200 Subject: [PATCH 2/2] Re-run against the fixed shared workflows oldrel-3 is now informational (continue-on-error): it was failing on a 404 Bioconductor mirror for old R rather than on package code.