[CHNOSZ-commits] r956 - in pkg/CHNOSZ: . .github/workflows

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 7 13:17:50 CET 2026


Author: jedick
Date: 2026-01-07 13:17:50 +0100 (Wed, 07 Jan 2026)
New Revision: 956

Added:
   pkg/CHNOSZ/.github/workflows/test-coverage.yaml
Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/README.md
Log:
Add CI workflow for Codecov


Added: pkg/CHNOSZ/.github/workflows/test-coverage.yaml
===================================================================
--- pkg/CHNOSZ/.github/workflows/test-coverage.yaml	                        (rev 0)
+++ pkg/CHNOSZ/.github/workflows/test-coverage.yaml	2026-01-07 12:17:50 UTC (rev 956)
@@ -0,0 +1,62 @@
+# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
+# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
+on:
+  push:
+    branches: [main, master]
+  pull_request:
+
+name: test-coverage.yaml
+
+permissions: read-all
+
+jobs:
+  test-coverage:
+    runs-on: ubuntu-latest
+    env:
+      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+
+    steps:
+      - uses: actions/checkout at v4
+
+      - uses: r-lib/actions/setup-r at v2
+        with:
+          use-public-rspm: true
+
+      - uses: r-lib/actions/setup-r-dependencies at 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")
+          )
+          print(cov)
+          covr::to_cobertura(cov)
+        shell: Rscript {0}
+
+      - uses: codecov/codecov-action at v4
+        with:
+          # Fail if error if not on PR, or if on PR and token is given
+          fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
+          file: ./cobertura.xml
+          plugin: 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 at v4
+        with:
+          name: coverage-test-failures
+          path: ${{ runner.temp }}/package

Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2026-01-07 10:25:43 UTC (rev 955)
+++ pkg/CHNOSZ/DESCRIPTION	2026-01-07 12:17:50 UTC (rev 956)
@@ -1,6 +1,6 @@
 Date: 2026-01-07
 Package: CHNOSZ
-Version: 2.2.0-22
+Version: 2.2.0-23
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/README.md
===================================================================
--- pkg/CHNOSZ/README.md	2026-01-07 10:25:43 UTC (rev 955)
+++ pkg/CHNOSZ/README.md	2026-01-07 12:17:50 UTC (rev 956)
@@ -1,6 +1,7 @@
 <!-- badges: start -->
 [![CRAN status](https://www.r-pkg.org/badges/version/CHNOSZ)](https://CRAN.R-project.org/package=CHNOSZ)
 [![R-CMD-check](https://github.com/jedick/CHNOSZ/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jedick/CHNOSZ/actions/workflows/R-CMD-check.yaml)
+[![Codecov test coverage](https://codecov.io/gh/jedick/CHNOSZ/graph/badge.svg)](https://app.codecov.io/gh/jedick/CHNOSZ)
 <!-- badges: end -->
 
 This is a mirror of the [primary repository on R-Forge](https://r-forge.r-project.org/projects/chnosz/).



More information about the CHNOSZ-commits mailing list