From 201f22596f4dca6394fd5e9ed9a7d2d9bf47d061 Mon Sep 17 00:00:00 2001 From: eezd Date: Wed, 4 Nov 2026 12:13:08 +0800 Subject: [PATCH] fix(ci): include acceptance scripts in backend checks Supply repository scripts as a named build context for the backend check stage so containerized regression tests can import the same acceptance helpers as local tests. Keep operator scripts out of the runtime image. --- deploy/Dockerfile.backend | 1 + scripts/ci.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/Dockerfile.backend b/deploy/Dockerfile.backend index 90ccb70..eb1cdf7 100644 --- a/deploy/Dockerfile.backend +++ b/deploy/Dockerfile.backend @@ -10,6 +10,7 @@ COPY . . RUN uv sync --locked --no-dev FROM base AS check +COPY --from=project-scripts . /scripts/ RUN uv sync --locked && uv run pytest && uvx ruff==0.14.14 check --select F,E9,B src tests FROM base AS browser-download diff --git a/scripts/ci.py b/scripts/ci.py index bca98d9..50fc4a8 100644 --- a/scripts/ci.py +++ b/scripts/ci.py @@ -216,7 +216,8 @@ def check(): save(ROOT / 'build.json', build) for part in IMAGES: print('Checking ' + part, flush=True) - run('docker', 'build', '--provenance=false', '--platform', 'linux/amd64', '--target', 'check', + contexts = ['--build-context', f'project-scripts={ROOT / "scripts"}'] if part == 'backend' else [] + run('docker', 'build', *contexts, '--provenance=false', '--platform', 'linux/amd64', '--target', 'check', '-f', ROOT / f'deploy/Dockerfile.{part}', ROOT / part) reused = existing_image(part, build) local = reused or 'alphapulse-ci:' + label + '-' + part