From d2a5f866e7a64d2d33bcc016ea2c46d244780682 Mon Sep 17 00:00:00 2001 From: mik-laj <12058428+mik-laj@users.noreply.github.com> Date: Sat, 23 May 2026 16:34:08 +0200 Subject: [PATCH 1/3] ci: add pytest job for minimum dependency versions Add a new CI job 'pytest-min-deps' that installs the lowest allowed versions of direct dependencies (as declared in pyproject.toml) using uv's --resolution=lowest-direct flag, then runs the test suite. This ensures the declared minimum version bounds are actually compatible with the library. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/tests.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ffc0dde0..377e3139 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -48,6 +48,28 @@ jobs: include-hidden-files: true path: .coverage + pytest-min-deps: + name: Python ${{ env.DEFAULT_PYTHON }} (minimum dependencies) + runs-on: ubuntu-latest + steps: + - name: โคต๏ธ Check out code from GitHub + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: ๐Ÿ— Set up Python ${{ env.DEFAULT_PYTHON }} + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: ${{ env.DEFAULT_PYTHON }} + - name: ๐Ÿ— Install uv + run: pipx install uv + - name: ๐Ÿ— Install dependencies (minimum versions) + run: > + uv pip install --system --resolution=lowest-direct + -e ".[cli]" + aioresponses pytest pytest-asyncio pytest-cov covdefaults syrupy + - name: ๐Ÿš€ Run pytest + run: pytest tests + coverage: runs-on: ubuntu-latest needs: pytest From 3dbd82806134d4674ccf876e3517ecf998ed2c32 Mon Sep 17 00:00:00 2001 From: mik-laj <12058428+mik-laj@users.noreply.github.com> Date: Sat, 23 May 2026 16:41:21 +0200 Subject: [PATCH 2/3] ci: fix pytest-min-deps job based on review feedback - Split dependency install into two steps: project with --resolution=lowest-direct, test tools installed separately to avoid applying lowest-direct to pytest/aioresponses/etc. - Add --no-cov to pytest invocation to override pyproject.toml addopts = "--cov" since this job doesn't collect coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/tests.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 377e3139..70eb7260 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -62,13 +62,12 @@ jobs: python-version: ${{ env.DEFAULT_PYTHON }} - name: ๐Ÿ— Install uv run: pipx install uv - - name: ๐Ÿ— Install dependencies (minimum versions) - run: > - uv pip install --system --resolution=lowest-direct - -e ".[cli]" - aioresponses pytest pytest-asyncio pytest-cov covdefaults syrupy + - name: ๐Ÿ— Install package (minimum dependency versions) + run: uv pip install --system --resolution=lowest-direct -e ".[cli]" + - name: ๐Ÿ— Install test dependencies + run: uv pip install --system aioresponses pytest pytest-asyncio syrupy - name: ๐Ÿš€ Run pytest - run: pytest tests + run: pytest tests --no-cov coverage: runs-on: ubuntu-latest From efcb413d93cfa52c0f668e3fc53fe3d81f043169 Mon Sep 17 00:00:00 2001 From: mik-laj <12058428+mik-laj@users.noreply.github.com> Date: Sat, 23 May 2026 17:21:20 +0200 Subject: [PATCH 3/3] ci: add pytest-cov to min-deps test dependencies pytest-cov must be installed even when --no-cov is passed, because pyproject.toml addopts = "--cov" causes pytest to load the plugin on startup before --no-cov can take effect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 70eb7260..f5d7c18e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -65,7 +65,7 @@ jobs: - name: ๐Ÿ— Install package (minimum dependency versions) run: uv pip install --system --resolution=lowest-direct -e ".[cli]" - name: ๐Ÿ— Install test dependencies - run: uv pip install --system aioresponses pytest pytest-asyncio syrupy + run: uv pip install --system aioresponses pytest pytest-asyncio pytest-cov syrupy - name: ๐Ÿš€ Run pytest run: pytest tests --no-cov