From 2d8c8d56e7756596c0fd2ef1ccbea3b7bc1eb465 Mon Sep 17 00:00:00 2001 From: didericis Date: Sat, 18 Jul 2026 04:53:29 -0400 Subject: [PATCH] ci(test): drop actions/setup-python; install into the container's system Python The old act_runner engine (v0.2.13 on the delphi-ci runner) mishandles actions/setup-python's PATH injection: pip installs coverage into the toolcache interpreter while `python3` in later steps resolves back to the image's system Python, so unit/coverage jobs failed with "No module named coverage". Newer runners (TrueNAS's v0.6.1) don't, which is why it only broke on delphi. The runner-images/act container already ships Python 3.12, and the job container is ephemeral, so drop setup-python entirely and install straight into the system Python with --break-system-packages. Every step now uses one interpreter consistently, on any runner version. Also removes the redundant setup-python step from the integration job (stdlib-only). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01UoEZHDjv84ChoZbozQERhJ --- .gitea/workflows/test.yml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 081b544..a8aec7d 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -34,13 +34,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - + # No actions/setup-python: the runner image already ships Python 3.12, + # and older act_runner engines mishandle setup-python's PATH (coverage + # lands in one interpreter, `python3` resolves to another). Install + # straight into the ephemeral job container's system Python — + # --break-system-packages is safe because the container is disposable. - name: Install dev requirements - run: python3 -m pip install -r requirements-dev.txt + run: python3 -m pip install --break-system-packages -r requirements-dev.txt - name: Run unit tests run: python3 -m coverage run -m unittest discover -t . -s tests/unit -v @@ -54,11 +54,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - + # No actions/setup-python (see the note in the `unit` job); the + # container's system Python 3.12 runs the stdlib test suite directly. - name: Show environment run: | python3 --version @@ -88,13 +85,13 @@ jobs: with: fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - + # No actions/setup-python: the runner image already ships Python 3.12, + # and older act_runner engines mishandle setup-python's PATH (coverage + # lands in one interpreter, `python3` resolves to another). Install + # straight into the ephemeral job container's system Python — + # --break-system-packages is safe because the container is disposable. - name: Install dev requirements - run: python3 -m pip install -r requirements-dev.txt + run: python3 -m pip install --break-system-packages -r requirements-dev.txt - name: Combined coverage report (unit + integration) run: PYTHON=python3 bash scripts/coverage.sh critical