From 14e9f2f9652e3ec535c6d3119bfb7b7de1286b1c Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Mon, 14 Sep 2026 10:21:01 +0200 Subject: [PATCH 1/2] add code coverage --- .github/workflows/test.yml | 10 ++++++++++ README.md | 1 + 2 files changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 423a01f..dceddd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,16 @@ jobs: - name: Unit + integration tests shell: bash run: uv run pytest -m "not docker" --cov --cov-report=xml --cov-report=term-missing --junitxml=junit.xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@e53489f4d376d79066609109e7a95a29eb3740b1 # v7.0.0 + if: always() + with: + # Public repos don't need a token, maybe add later if needed + # token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml + flags: py${{ matrix.python }} + name: py${{ matrix.python }} + fail_ci_if_error: false - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: always() with: diff --git a/README.md b/README.md index 8712d7d..87ee360 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # git-ftp (Python) [![test](https://github.com/git-ftp/git-ftp-py/actions/workflows/test.yml/badge.svg)](https://github.com/git-ftp/git-ftp-py/actions/workflows/test.yml) +[![codecov](https://codecov.io/gh/git-ftp/git-ftp-py/graph/badge.svg)](https://codecov.io/gh/git-ftp/git-ftp-py) [![PyPI](https://img.shields.io/pypi/v/git-ftp.svg)](https://pypi.org/project/git-ftp/) [![Python versions](https://img.shields.io/pypi/pyversions/git-ftp.svg)](https://pypi.org/project/git-ftp/) [![License](https://img.shields.io/pypi/l/git-ftp.svg)](https://www.gnu.org/licenses/gpl-3.0) From a857d70a12465cb562cd92b939a6d5a0bb1c9764 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Mon, 14 Sep 2026 13:15:03 +0200 Subject: [PATCH 2/2] fix failing tests --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dceddd7..ed70afc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,11 @@ env: UV_LOCKED: "1" PYTHONUTF8: "1" FORCE_COLOR: "1" + # HEAD often sits past a .devN prerelease tag, which setuptools-scm/hatch-vcs + # cannot version ("the can't be bumped"), so every uv build/sync would + # fail. CI builds don't need the real version, so pin one and skip git version + # resolution. Releases are versioned by publish.yml from the tag itself. + SETUPTOOLS_SCM_PRETEND_VERSION: "0.0.0" jobs: lint: