From 643f774c78c0cd1c6ceae631535567fca417e6d9 Mon Sep 17 00:00:00 2001 From: Timmy Date: Sun, 23 Aug 2026 00:00:00 +0000 Subject: [PATCH] ci: load deployment smoke module correctly --- .gitea/workflows/quality.yml | 2 +- tests/ci-workflow.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml index c83115f..35f7dd4 100644 --- a/.gitea/workflows/quality.yml +++ b/.gitea/workflows/quality.yml @@ -64,6 +64,6 @@ jobs: npm run check:syntax node --check tests/staging.acceptance.mjs - name: Image runtime pin and re-encode smoke - run: python3 -c "import importlib.util,json,pathlib; s=importlib.util.spec_from_file_location('d','scripts/deploy_staging.py'); m=importlib.util.module_from_spec(s); s.loader.exec_module(m); print(json.dumps(m.verify_image_runtime(pathlib.Path('.'))))" + run: python3 -c "import importlib.util,json,pathlib,sys; s=importlib.util.spec_from_file_location('d','scripts/deploy_staging.py'); m=importlib.util.module_from_spec(s); sys.modules[s.name]=m; s.loader.exec_module(m); print(json.dumps(m.verify_image_runtime(pathlib.Path('.'))))" - name: Diff hygiene run: npm run check:diff diff --git a/tests/ci-workflow.test.js b/tests/ci-workflow.test.js index 04eff59..5e642b0 100644 --- a/tests/ci-workflow.test.js +++ b/tests/ci-workflow.test.js @@ -20,6 +20,7 @@ test('Gitea CI gates pull requests and main with the reproducible quality suite' assert.match(workflow, /uses: actions\/setup-python@v5/); assert.match(workflow, /python-version: ['"]3\.11['"]/); assert.match(workflow, /TIMMY_PYTHON=.*sys\.executable/); + assert.match(workflow, /sys\.modules\[s\.name\]=m/); assert.match(workflow, /npm test/); assert.match(workflow, /npm run test:ui/); assert.match(workflow, /npm run test:photo/);