From 6e7f2ac4e9d4df6a727adf01aca232e3f7d7b9dd Mon Sep 17 00:00:00 2001 From: Hugo DUPRAS Date: Tue, 31 Mar 2026 10:57:45 +0200 Subject: [PATCH] [tool] Use uv and export coverage to CodeCov --- .github/workflows/coverage.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 28ac0ca..e4fe6b2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,22 +15,31 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Setup uv + uses: astral-sh/setup-uv@v8.0.0 with: python-version: "3.12" - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install -e '.[dev]' coverage + uv venv && uv pip install -e '.[dev]' coverage - name: Run tests with coverage - run: python -m coverage run -m unittest + run: uv run coverage run -m unittest - name: Print coverage summary - run: python -m coverage report -m --fail-under=70 - - + run: uv run coverage report -m --fail-under=70 + + - name: Generate coverage XML + run: uv run coverage xml -o coverage.xml + + - name: Upload coverage to Codecov + if: ${{ !cancelled() && hashFiles('coverage.xml') != '' }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: connectors + fail_ci_if_error: false + verbose: true