Skip to content

Commit 9780464

Browse files
author
timhauke
committed
Configure CI tests and fix Docker Python version
Set `PYTHONPATH` in CI to ensure proper module discovery for tests. Add `PYTEST_ADDOPTS` for non-capturing output and fail-fast behavior. Correct Dockerfile base image from `python:3.14-slim` to `python:3.12-slim`.
1 parent 5f65f20 commit 9780464

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
jobs:
1414
test:
1515
runs-on: ubuntu-latest
16+
env:
17+
PYTHONPATH: ${{ github.workspace }}
18+
PYTEST_ADDOPTS: "--capture=no --maxfail=1"
1619
strategy:
1720
matrix:
1821
python-version: ["3.10", "3.11"]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.14-slim AS runtime
1+
FROM python:3.12-slim AS runtime
22

33
ENV PYTHONUNBUFFERED=1 \
44
PIP_NO_CACHE_DIR=1

tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Pytest configuration helpers."""
2+
3+
import sys
4+
from pathlib import Path
5+
6+
ROOT = Path(__file__).resolve().parents[1]
7+
8+
if str(ROOT) not in sys.path:
9+
sys.path.insert(0, str(ROOT))

0 commit comments

Comments
 (0)