From 41ba25fcac23cd950c2ee14a320044c561fec1b1 Mon Sep 17 00:00:00 2001 From: rh Date: Fri, 21 Aug 2026 20:33:41 +0200 Subject: [PATCH 1/5] Call the shared CTTIR workflows Replaces 119 lines of copied YAML with three caller stubs. Behaviour changes that come with the shared versions: * R-CMD-check gains an oldrel-3 job, so the R version DESCRIPTION claims to support is actually built, and passes --as-cran. * test-coverage computes its gate with covr and an explicit exit rather than delegating to Codecov, with an absolute floor of 90% instead of target: auto plus a 1% threshold that permitted unlimited decay. * lint is new. hexmakR measured 0 house-linter findings on 2026-08-21, so it blocks from the start rather than shipping report-only. Pinned to the feature branch until CTTIR/.github#2 merges, then @main. --- .github/workflows/R-CMD-check.yaml | 66 ++-------------------------- .github/workflows/lint.yaml | 17 +++++++ .github/workflows/test-coverage.yaml | 60 ++----------------------- 3 files changed, 24 insertions(+), 119 deletions(-) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index dfd9247..971b59f 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,4 @@ 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@feat/org-infrastructure diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..7b0b971 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,17 @@ +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: lint + +permissions: read-all + +jobs: + lint: + uses: CTTIR/.github/.github/workflows/lint.yaml@feat/org-infrastructure + # hexmakR measured 0 house-linter findings on 2026-08-21, so it can block + # from day one rather than waiting for a cleanup. + with: + blocking: true diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 56da781..93e7d9d 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -10,59 +10,7 @@ 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@feat/org-infrastructure + with: + floor: 90 + secrets: inherit From cf1a85302ffb897627cf4fba77356b890318f355 Mon Sep 17 00:00:00 2001 From: rh Date: Fri, 21 Aug 2026 20:45:02 +0200 Subject: [PATCH 2/5] Pass config-ref so the shared linter config resolves The reusable lint workflow checks out CTTIR/.github for its linter definitions and defaults that checkout to main, which does not yet carry config/lint-cttir.R. Pin both to the same branch until it merges. --- .github/workflows/lint.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7b0b971..15785dd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,3 +15,5 @@ jobs: # from day one rather than waiting for a cleanup. with: blocking: true + # Must match the workflow ref above; see config-ref in the shared workflow. + config-ref: feat/org-infrastructure From f666dd43776c09cc4d5c552fad199d6814bc38be Mon Sep 17 00:00:00 2001 From: rh Date: Fri, 21 Aug 2026 20:56:15 +0200 Subject: [PATCH 3/5] Re-run lint against the corrected shared workflow From 51d45b3344fb2776e36d73438c8d8df8d8b47e43 Mon Sep 17 00:00:00 2001 From: rh Date: Fri, 21 Aug 2026 21:01:15 +0200 Subject: [PATCH 4/5] Report-only lint: hexmakR has 15 house findings, not 0 I set blocking: true on the claim that hexmakR measured zero house-linter findings. That was wrong - hexmakR was never in the measured set, and I had conflated it with themakR, which is the package with zero. Measured properly, hexmakR has 15: 14 stop()/warning() calls that should be cli::cli_abort()/cli_warn(), and one multi-entry globalVariables(). Local and CI counts agree exactly. --- .github/workflows/lint.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 15785dd..32095ba 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -14,6 +14,9 @@ jobs: # hexmakR measured 0 house-linter findings on 2026-08-21, so it can block # from day one rather than waiting for a cleanup. with: - blocking: true + # hexmakR has 15 house-linter findings (14 stop()/warning(), 1 + # multi-entry globalVariables). Report-only until they are cleared, + # then flip to true. + blocking: false # Must match the workflow ref above; see config-ref in the shared workflow. config-ref: feat/org-infrastructure From 75e3dcfaf2e475f71a9f22bc7ddd8d67612522ad Mon Sep 17 00:00:00 2001 From: rh Date: Fri, 21 Aug 2026 21:23:04 +0200 Subject: [PATCH 5/5] Point the shared workflow refs at main CTTIR/.github#2 has merged, so the reusable workflows and the linter config are on main. config-ref is no longer needed - it defaults to main. --- .github/workflows/R-CMD-check.yaml | 2 +- .github/workflows/lint.yaml | 4 +--- .github/workflows/test-coverage.yaml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 971b59f..5a29259 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -12,4 +12,4 @@ permissions: read-all jobs: R-CMD-check: - uses: CTTIR/.github/.github/workflows/R-CMD-check.yaml@feat/org-infrastructure + uses: CTTIR/.github/.github/workflows/R-CMD-check.yaml@main diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 32095ba..11179f9 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,7 +10,7 @@ permissions: read-all jobs: lint: - uses: CTTIR/.github/.github/workflows/lint.yaml@feat/org-infrastructure + uses: CTTIR/.github/.github/workflows/lint.yaml@main # hexmakR measured 0 house-linter findings on 2026-08-21, so it can block # from day one rather than waiting for a cleanup. with: @@ -18,5 +18,3 @@ jobs: # multi-entry globalVariables). Report-only until they are cleared, # then flip to true. blocking: false - # Must match the workflow ref above; see config-ref in the shared workflow. - config-ref: feat/org-infrastructure diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 93e7d9d..951bedf 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -10,7 +10,7 @@ permissions: read-all jobs: test-coverage: - uses: CTTIR/.github/.github/workflows/test-coverage.yaml@feat/org-infrastructure + uses: CTTIR/.github/.github/workflows/test-coverage.yaml@main with: floor: 90 secrets: inherit