From d12442d59a9e581a3c480ad3aff6ee6922dca377 Mon Sep 17 00:00:00 2001 From: "jack.burridge" Date: Wed, 28 Jan 2026 21:01:32 +0000 Subject: [PATCH 1/6] ci: combine coverage across matrix jobs before uploading --- .github/workflows/tests.yml | 29 +++++++++++++++++++++++ diff | 47 +++++++++++++++++++++++++++++++++++++ tox.ini | 1 + 3 files changed, 77 insertions(+) create mode 100644 diff diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dedc189..b6fee54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,6 +42,8 @@ jobs: pytest_args: -m "not integration" -v --cov --cov-append --cov-report=xml - os: windows-latest pytest_args: -m "not integration" -v --cov --cov-append --cov-report=xml + env: + COVERAGE_FILE: .coverage.${{ matrix.os }} steps: - uses: actions/checkout@v4 with: @@ -52,6 +54,33 @@ jobs: run: uv sync --locked --all-extras --dev - name: Run tests run: uv run tox -- ${{ matrix.pytest_args }} + - name: Upload coverage artifact + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.os }} + path: ${{ env.COVERAGE_FILE }} + if-no-files-found: error + coverage: + name: Combine & Upload Coverage + runs-on: ubuntu-latest + needs: tests + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install uv + uses: astral-sh/setup-uv@v6 + - name: Install the project + run: uv sync --locked --all-extras --dev + - name: Download coverage artifacts + uses: actions/download-artifact@v4 + with: + path: coverage_artifacts + - name: Combine coverage + run: | + uv run coverage combine coverage_artifacts/**/.coverage.* + uv run coverage xml -o coverage.xml + uv run coverage report -m - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: diff --git a/diff b/diff new file mode 100644 index 0000000..a10a4db --- /dev/null +++ b/diff @@ -0,0 +1,47 @@ +diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml +index dedc189..b6fee54 100644 +--- a/.github/workflows/tests.yml ++++ b/.github/workflows/tests.yml +@@ -42,6 +42,8 @@ jobs: + pytest_args: -m "not integration" -v --cov --cov-append --cov-report=xml + - os: windows-latest + pytest_args: -m "not integration" -v --cov --cov-append --cov-report=xml ++ env: ++ COVERAGE_FILE: .coverage.${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: +@@ -52,6 +54,33 @@ jobs: + run: uv sync --locked --all-extras --dev + - name: Run tests + run: uv run tox -- ${{ matrix.pytest_args }} ++ - name: Upload coverage artifact ++ uses: actions/upload-artifact@v4 ++ with: ++ name: coverage-${{ matrix.os }} ++ path: ${{ env.COVERAGE_FILE }} ++ if-no-files-found: error ++ coverage: ++ name: Combine & Upload Coverage ++ runs-on: ubuntu-latest ++ needs: tests ++ steps: ++ - uses: actions/checkout@v4 ++ with: ++ fetch-depth: 0 ++ - name: Install uv ++ uses: astral-sh/setup-uv@v6 ++ - name: Install the project ++ run: uv sync --locked --all-extras --dev ++ - name: Download coverage artifacts ++ uses: actions/download-artifact@v4 ++ with: ++ path: coverage_artifacts ++ - name: Combine coverage ++ run: | ++ uv run coverage combine coverage_artifacts/**/.coverage.* ++ uv run coverage xml -o coverage.xml ++ uv run coverage report -m + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: diff --git a/tox.ini b/tox.ini index 7fb0861..f3270e3 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,7 @@ env_list = runner = uv-venv-lock-runner description = run the tests with pytest pass_env = + COVERAGE_FILE DOCKER_HOST RYUK_CONTAINER_IMAGE RYUK_RECONNECTION_TIMEOUT From 22d346ec94a8a97b87508a36de503d5c10114e15 Mon Sep 17 00:00:00 2001 From: "jack.burridge" Date: Wed, 28 Jan 2026 21:23:48 +0000 Subject: [PATCH 2/6] ci: test coverage location --- .github/workflows/tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b6fee54..6ec0f4a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,6 +54,11 @@ jobs: run: uv sync --locked --all-extras --dev - name: Run tests run: uv run tox -- ${{ matrix.pytest_args }} + - name: debug coverage output + shell: bash + run: | + echo "COVERAGE_FILE=$COVERAGE_FILE" + find . -maxdepth 5 -name ".coverage*" -print - name: Upload coverage artifact uses: actions/upload-artifact@v4 with: From 1c3125f20ac0a9ae3d9f29b2352dde37ea79a3a2 Mon Sep 17 00:00:00 2001 From: "jack.burridge" Date: Wed, 28 Jan 2026 21:29:54 +0000 Subject: [PATCH 3/6] ci: use explicit directory --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6ec0f4a..8d77b02 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.os }} - path: ${{ env.COVERAGE_FILE }} + path: ${{ github.workspace }}/${{ env.COVERAGE_FILE }} if-no-files-found: error coverage: name: Combine & Upload Coverage From 218cb76989a66db2e26a474d6ea211dac37456b6 Mon Sep 17 00:00:00 2001 From: "jack.burridge" Date: Wed, 28 Jan 2026 21:37:01 +0000 Subject: [PATCH 4/6] ci: more debug --- .github/workflows/tests.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8d77b02..8f02c32 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,8 +57,17 @@ jobs: - name: debug coverage output shell: bash run: | + echo "pwd=$(pwd)" + echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" echo "COVERAGE_FILE=$COVERAGE_FILE" - find . -maxdepth 5 -name ".coverage*" -print + echo "ls in pwd:" + ls -la + echo "ls in workspace:" + ls -la "$GITHUB_WORKSPACE" + echo "find coverage under workspace:" + find "$GITHUB_WORKSPACE" -maxdepth 5 -name ".coverage*" -print + echo "find coverage under pwd:" + find "$(pwd)" -maxdepth 5 -name ".coverage*" -print - name: Upload coverage artifact uses: actions/upload-artifact@v4 with: From 30f7172dd39073874a894b33d82c76572837e248 Mon Sep 17 00:00:00 2001 From: "jack.burridge" Date: Wed, 28 Jan 2026 21:44:09 +0000 Subject: [PATCH 5/6] ci: include hidden files --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8f02c32..1110d41 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -74,6 +74,7 @@ jobs: name: coverage-${{ matrix.os }} path: ${{ github.workspace }}/${{ env.COVERAGE_FILE }} if-no-files-found: error + include-hidden-files: true coverage: name: Combine & Upload Coverage runs-on: ubuntu-latest From 993ca01c7866a2a88e02ca020a21d0cc071d42d9 Mon Sep 17 00:00:00 2001 From: "jack.burridge" Date: Wed, 28 Jan 2026 21:59:17 +0000 Subject: [PATCH 6/6] ci: ignore errors --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1110d41..4419c1e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,7 +76,7 @@ jobs: if-no-files-found: error include-hidden-files: true coverage: - name: Combine & Upload Coverage + name: Upload Coverage runs-on: ubuntu-latest needs: tests steps: @@ -93,7 +93,7 @@ jobs: path: coverage_artifacts - name: Combine coverage run: | - uv run coverage combine coverage_artifacts/**/.coverage.* + uv run coverage combine --ignore-errors coverage_artifacts/**/.coverage.* uv run coverage xml -o coverage.xml uv run coverage report -m - name: Upload coverage reports to Codecov