From dd3e837bc18bea36e4ffff53ba99f41ee351bced Mon Sep 17 00:00:00 2001 From: "code-coverage-agent[bot]" <295130552+Code Coverage Agent@users.noreply.github.com> Date: Wed, 5 Aug 2026 16:25:54 +0000 Subject: [PATCH 1/4] Initial plan From 6a91d05c83edd8de74be983490ad686edf906e2c Mon Sep 17 00:00:00 2001 From: "code-coverage-agent[bot]" <295130552+Code Coverage Agent@users.noreply.github.com> Date: Wed, 5 Aug 2026 16:28:07 +0000 Subject: [PATCH 2/4] Add GitHub native coverage reporting to pytest-cov workflow Co-authored-by: remyleone <300834+remyleone@users.noreply.github.com> --- .github/workflows/pytest-cov.yml | 37 +++++++++++++++++++++++++------- .gitignore | 5 +++++ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pytest-cov.yml b/.github/workflows/pytest-cov.yml index 4a9e92ecf..a9147e675 100644 --- a/.github/workflows/pytest-cov.yml +++ b/.github/workflows/pytest-cov.yml @@ -35,13 +35,34 @@ jobs: - name: Install dependencies and library run: poetry install - name: Run tests with coverage - run: poetry run pytest --cov --junitxml=junit.xml -o junit_family=legacy - - name: Upload coverage to Codecov - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + run: poetry run pytest --cov --cov-report=xml:coverage.xml --junitxml=junit.xml -o junit_family=legacy + - name: Upload coverage artifact + if: ${{ matrix.python-version == '3.12' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }} + uses: actions/upload-artifact@v7 with: - token: ${{ secrets.CODECOV_TOKEN }} - - name: Upload test results to Codecov - if: ${{ !cancelled() }} - uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1 + name: coverage-report-python-${{ matrix.lib }} + path: ${{ matrix.lib }}/coverage.xml + + upload-coverage-python: + needs: pytest-cov + if: ${{ !cancelled() && needs.pytest-cov.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }} + runs-on: ubuntu-latest + permissions: + contents: read + code-quality: write + strategy: + matrix: + lib: + - scaleway-core + - scaleway + - scaleway-async + steps: + - name: Download coverage artifact + uses: actions/download-artifact@v8 + with: + name: coverage-report-python-${{ matrix.lib }} + - uses: actions/upload-code-coverage@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} + file: coverage.xml + language: Python + label: code-coverage-agent diff --git a/.gitignore b/.gitignore index 7c93a5488..9df20798f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,8 @@ dist/ # macOS .DS_Store + +# Coverage reports +coverage.xml +.coverage +htmlcov/ From 3fa9a4d52d74e87d9b4247c9cb552a94c7fcb637 Mon Sep 17 00:00:00 2001 From: Geoffrey JOUNT Date: Mon, 24 Aug 2026 15:02:43 +0200 Subject: [PATCH 3/4] make reviewdog error blocking --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 07ca0fc05..0e8bf5183 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -45,3 +45,5 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Check workflow files uses: reviewdog/action-actionlint@1f3610e92fa221aa2b7c1756bccf5437efd416a4 # v1.70.0 + with: + fail_level: error From 9f9a6b5a38877109f0dc8845c795179082cbf2dd Mon Sep 17 00:00:00 2001 From: Geoffrey JOUNT Date: Mon, 24 Aug 2026 15:25:50 +0200 Subject: [PATCH 4/4] fix job --- .github/workflows/pytest-cov.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest-cov.yml b/.github/workflows/pytest-cov.yml index a9147e675..86037764a 100644 --- a/.github/workflows/pytest-cov.yml +++ b/.github/workflows/pytest-cov.yml @@ -45,11 +45,10 @@ jobs: upload-coverage-python: needs: pytest-cov - if: ${{ !cancelled() && needs.pytest-cov.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }} + if: !cancelled() && needs.pytest-cov.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) runs-on: ubuntu-latest permissions: contents: read - code-quality: write strategy: matrix: lib: