From 47dd306cfd9db5d79b97ffb789091b669eb272f9 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Fri, 23 Oct 2026 11:01:49 +0200 Subject: [PATCH] CI: Fix sdk dependency in `server-test` job Currently, there is no way to declare the `basyx-python-sdk` as dependency of the `server` package with matching version numbers, so the `pyproject.toml` defines only a lower constraint `basyx-python-sdk>=1.0.0` (see #592 for details). Previously, this lead in the `server-test` job to the situation, that `pip install .[dev]` installed the `sdk` again from PyPI, because the locally build `sdk` (`pip install ../sdk`) is flagged as version `0.1.dev1+g` and therefore does not fulfill the requirement. This is caused by the GitHub Action `actions/checkout` that by default only checks out the last commit, not including any tags, so `setuptools_scm` assigns the sdk a wrong version number. These changes apply the same workaround that we already used for the `server-static-analysis` job. It checks out the full depth of the repo, including the tags, so the `sdk` package is built with a version `>=1.0.0`. Fixes #662 --- .github/workflows/pr.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f2e475f2..dd20862c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -352,6 +352,11 @@ jobs: steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 #v5.1.0 + with: + # TODO(#592): revisit when the sdk<->server version pinning is fixed. + # Need tags so setuptools_scm builds the local sdk as >=1.0.0, else the loose + # `basyx-python-sdk>=1.0.0` pin lets pip replace it with the PyPI release. + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v7 with: