diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 845a058f..8aafa7a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,6 +317,7 @@ jobs: with: name: coverage-e2e path: reports/.coverage + include-hidden-files: true retention-days: 1 # ── Coverage merge & upload ─────────────────────────────────────────────── @@ -355,19 +356,31 @@ jobs: path: coverage-artifacts/ - name: Combine coverage data + id: combine_coverage run: | - mkdir -p reports + mkdir -p reports coverage-artifacts + mapfile -t coverage_files < <(find coverage-artifacts -name ".coverage" -type f 2>/dev/null || true) + + if [ "${#coverage_files[@]}" -eq 0 ]; then + echo "No .coverage artifacts found. Skipping merged coverage generation." + echo "coverage_available=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + i=0 - while IFS= read -r f; do + for f in "${coverage_files[@]}"; do cp "$f" "reports/.coverage.$i" i=$((i + 1)) - done < <(find coverage-artifacts -name ".coverage" -type f) + done + uv run coverage combine reports/ uv run coverage xml -o reports/coverage-merged.xml uv run coverage report --skip-covered + echo "coverage_available=true" >> "$GITHUB_OUTPUT" - name: Upload merged coverage to Codecov - uses: codecov/codecov-action@v7 + if: steps.combine_coverage.outputs.coverage_available == 'true' + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} files: reports/coverage-merged.xml diff --git a/uv.lock b/uv.lock index e4155fbf..d0b68ce4 100644 --- a/uv.lock +++ b/uv.lock @@ -5216,15 +5216,15 @@ wheels = [ [[package]] name = "pytest-rerunfailures" -version = "16.2" +version = "16.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "packaging" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/6b/27/fd0209642f3a1069da3e0be3c7e339f942d052d81ccb1fb4eb9b187d3633/pytest_rerunfailures-16.2.tar.gz", hash = "sha256:5f5a32f15674a3d54f7598388fcd3cc1bc5c37284731a4704a44485dcdda5e23", size = 32121, upload-time = "2026-05-13T08:13:26.998Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4d/f0/74f8e685be7ecd1572c1256132f18fce3a665d7e07649a3f23b7eb2d3bec/pytest_rerunfailures-16.3.tar.gz", hash = "sha256:37c9b1231c8083e9f4e724f50f7a21241822f9516c15c700ebbf218d6452355c", size = 34148, upload-time = "2026-05-22T06:51:22.292Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/a5/d8c1ad74529b483044b787ead2d24ecc624bca4084a509002102e4bab8cc/pytest_rerunfailures-16.2-py3-none-any.whl", hash = "sha256:c22a53d2827becc76f057d4ded123c0e726523f2f0e5f0bb4efb31fd59e1f14e", size = 14505, upload-time = "2026-05-13T08:13:25.485Z" }, + { url = "https://files.pythonhosted.org/packages/f8/98/58a71d68d3126d7f6a6ed1944c37ec207a4ff3dc66cad3bed7b59d38df61/pytest_rerunfailures-16.3-py3-none-any.whl", hash = "sha256:6bdfb8ffb46c46072e6c16bdedee38b6c13eac620d9415ed5b63152cbf283170", size = 15396, upload-time = "2026-05-22T06:51:20.547Z" }, ] [[package]]