fix(ci): isolate parser dependencies without venv
This commit is contained in:
@@ -55,16 +55,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
# The Debian runner's system Python omits ensurepip/python3-venv. Use the
|
|
||||||
# self-contained Actions runtime so the parser test can create an isolated
|
|
||||||
# environment without mutating the runner or requiring sudo.
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
cache: pip
|
|
||||||
cache-dependency-path: tools/summarizer/requirements-linux.lock
|
|
||||||
|
|
||||||
- name: Test repository safety scripts
|
- name: Test repository safety scripts
|
||||||
# Standard-library only and plan-only: this validates the synthetic benchmark harness
|
# Standard-library only and plan-only: this validates the synthetic benchmark harness
|
||||||
# without contacting Ollama, pulling a model, or requiring package installation.
|
# without contacting Ollama, pulling a model, or requiring package installation.
|
||||||
@@ -80,14 +70,15 @@ jobs:
|
|||||||
- name: Test document parser boundary
|
- name: Test document parser boundary
|
||||||
working-directory: tools/summarizer
|
working-directory: tools/summarizer
|
||||||
run: |
|
run: |
|
||||||
python3 -m venv .venv-ci
|
# The Debian runner has pip but intentionally omits python3-venv.
|
||||||
. .venv-ci/bin/activate
|
# Install into the checkout so CI remains isolated without sudo or a
|
||||||
python -m pip install --upgrade pip
|
# mutable runner-global Python environment.
|
||||||
python -m pip install --require-hashes \
|
rm -rf .python-ci
|
||||||
|
python3 -m pip install --target .python-ci --require-hashes \
|
||||||
--extra-index-url https://download.pytorch.org/whl/cpu \
|
--extra-index-url https://download.pytorch.org/whl/cpu \
|
||||||
-r requirements-linux.lock
|
-r requirements-linux.lock
|
||||||
python -m pip install pytest==8.3.5 httpx2==2.12.0
|
python3 -m pip install --target .python-ci pytest==8.3.5 httpx2==2.12.0
|
||||||
AI_SERVICE_SKIP_MODEL_LOAD=1 python -m pytest -q
|
PYTHONPATH="$PWD/.python-ci" AI_SERVICE_SKIP_MODEL_LOAD=1 python3 -m pytest -q
|
||||||
|
|
||||||
- name: Restore backend
|
- name: Restore backend
|
||||||
# The runner/proxy has occasionally supplied checksum-invalid NuGet cache entries (NU3008).
|
# The runner/proxy has occasionally supplied checksum-invalid NuGet cache entries (NU3008).
|
||||||
|
|||||||
Reference in New Issue
Block a user