From c7a96e907070b4c9610be87f68d1719cee8d9347 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 27 Mar 2026 16:50:52 +0100 Subject: [PATCH 1/5] Upload coverage to Coveralls.io --- .github/workflows/test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e4584eed..b3ea2642 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,14 @@ jobs: pip install pytest pytest-cov pip install ./target if [ "${{ matrix.python-version }}" = "3.14" ]; then - pytest -v --cov=openminds --cov-report term pipeline/tests + pytest -v --cov=openminds --cov-report term --cov-report lcov pipeline/tests else pytest -v pipeline/tests fi + + - name: Upload coverage to Coveralls + if: matrix.python-version == '3.14' + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: coverage.lcov From fa15fce1e3aee414ee01611e80b1e1688d46206d Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 27 Mar 2026 17:00:05 +0100 Subject: [PATCH 2/5] Disable parallel mode for Coveralls upload --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3ea2642..95b76d2b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,3 +45,4 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: coverage.lcov + parallel: false From 35cb7db2fbc015a8a00401f00eb963889366b7a6 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 11 Sep 2026 11:55:49 +0200 Subject: [PATCH 3/5] Update .github/workflows/test.yml Co-authored-by: Raphael-Gazzotti <125291580+Raphael-Gazzotti@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95b76d2b..c3b2d2e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,5 +44,5 @@ jobs: uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: coverage.lcov + file: coverage.lcov parallel: false From 239310c0ce25bbeb1e492f4e9594b59784e6853f Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 11 Sep 2026 12:19:30 +0200 Subject: [PATCH 4/5] Measure coverage against the in-tree build Coverage was measured against the copy of the package installed into site-packages, so the paths reported to Coveralls embedded the Python patch version and changed with every runner image update, leaving consecutive builds with no files in common. Putting target/ first on PYTHONPATH records the same files as target/openminds/..., which the Coveralls reporter reduces to a stable repo-relative path. Also set fail-on-error: false, so that a failed upload from a fork pull request does not fail the job. --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3b2d2e1..cd407bd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,10 @@ jobs: pip install pytest pytest-cov pip install ./target if [ "${{ matrix.python-version }}" = "3.14" ]; then - pytest -v --cov=openminds --cov-report term --cov-report lcov pipeline/tests + # Put the in-tree build first on the path, so that coverage is recorded + # against target/openminds rather than the copy in site-packages, whose + # path changes with every Python patch release. + PYTHONPATH=target pytest -v --cov=openminds --cov-report term --cov-report lcov pipeline/tests else pytest -v pipeline/tests fi @@ -46,3 +49,4 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} file: coverage.lcov parallel: false + fail-on-error: false From 5770e3691ffa8d510ce8fcd2c158449f16e1ec86 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 11 Sep 2026 12:23:34 +0200 Subject: [PATCH 5/5] Upload coverage from builds of the pipeline branch The test workflow only runs on pull requests, so Coveralls has no build of the pipeline branch itself. This measures coverage on the 3.14 leg of the build workflow as well, and uploads it the same way. --- .github/workflows/build.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e0b3071..6353adbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,9 +30,25 @@ jobs: - name: Test built package run: | - pip install pytest + pip install pytest pytest-cov pip install ./target - pytest -v pipeline/tests + if [ "${{ matrix.python-version }}" = "3.14" ]; then + # Put the in-tree build first on the path, so that coverage is recorded + # against target/openminds rather than the copy in site-packages, whose + # path changes with every Python patch release. + PYTHONPATH=target pytest -v --cov=openminds --cov-report term --cov-report lcov pipeline/tests + else + pytest -v pipeline/tests + fi + + - name: Upload coverage to Coveralls + if: matrix.python-version == '3.14' + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + file: coverage.lcov + parallel: false + fail-on-error: false - name: Checkout main branch uses: actions/checkout@v4