From 791863fbf51d53e4ca89c6f86d1c4383baaad904 Mon Sep 17 00:00:00 2001 From: rh Date: Sat, 22 Aug 2026 10:34:20 +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 | 52 +++------------------ .github/workflows/lint.yaml | 16 +++++++ .github/workflows/test-coverage.yaml | 67 ++++------------------------ 3 files changed, 30 insertions(+), 105 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 6de7639..bfd708d 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,57 +1,15 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# 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] pull_request: - workflow_dispatch: + branches: [main, master] -name: R-CMD-check.yaml +name: R-CMD-check 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 - - 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 - - - name: Install system dependencies (Linux) - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y libgdal-dev libgeos-dev libproj-dev libudunits2-dev - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - - 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 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..c1ccbce --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,16 @@ +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: lint + +permissions: read-all + +jobs: + lint: + 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 9842747..bb19507 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,68 +1,19 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples on: push: branches: [main, master] pull_request: - workflow_dispatch: + branches: [main, master] -name: test-coverage.yaml +name: test-coverage permissions: read-all jobs: test-coverage: - 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 - - - name: Install system dependencies (Linux) - run: | - sudo apt-get update - sudo apt-get install -y libgdal-dev libgeos-dev libproj-dev libudunits2-dev - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::covr, any::xml2 - needs: coverage - - - 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: - # Upload is best-effort: without a CODECOV_TOKEN secret the upload to a - # protected branch is rejected, and coverage reporting should not fail - # the job. Set the CODECOV_TOKEN repository secret to enable uploads. - fail_ci_if_error: false - file: ./cobertura.xml - plugins: noop - disable_search: true - token: ${{ secrets.CODECOV_TOKEN }} - - - name: Show testthat output - if: always() - run: | - ## -------------------------------------------------------------------- - find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload test results - if: failure() - uses: actions/upload-artifact@v4 - with: - name: coverage-test-failures - path: ${{ runner.temp }}/package + 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 36c1a062eed4d22d4ec2f6e0201e747ecaac9456 Mon Sep 17 00:00:00 2001 From: rh Date: Sat, 22 Aug 2026 10:59:02 +0200 Subject: [PATCH 2/2] Re-run against the fixed shared workflows CTTIR/.github now gives lint the CTTIR r-universe (several packages Suggest sibling CTTIR packages, and pak could not solve them) and marks oldrel-3 informational (it was failing on a 404 Bioconductor mirror for old R, not on package code).