From 218708db4bec924724361813fcb3a941ad08df4d Mon Sep 17 00:00:00 2001 From: Ming Du Date: Mon, 21 Jul 2025 10:06:13 -0500 Subject: [PATCH 1/2] CI: use system uv; always activate venv at each step --- .github/workflows/python-app.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 20c7d73..4bcc639 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -30,15 +30,18 @@ jobs: - name: Create environment id: create_env run: | - pip install uv uv venv --python 3.11 .venv_lint source .venv_lint/bin/activate - name: Install Ruff - run: uv pip install ruff + run: | + source .venv_lint/bin/activate + uv pip install ruff - name: Run Ruff - run: ruff check src/ --output-format=github + run: | + source .venv_lint/bin/activate + ruff check src/ --output-format=github - name: Remove environment if: always() @@ -68,22 +71,25 @@ jobs: - name: Create environment id: create_env run: | - pip install uv uv venv --python 3.11 .venv_pytest source .venv_pytest/bin/activate - name: Install dependencies run: | + source .venv_lint/bin/activate uv pip install --upgrade pip uv pip install pytest uv pip install -r requirements.txt uv pip install -e . - name: List build environment - run: uv pip list + run: | + source .venv_lint/bin/activate + uv pip list - name: Test with pytest run: | + source .venv_lint/bin/activate echo $(which python) cd tests pytest -s --high-tol From 6cba649dd7400939ae192df0c38ef06d6c6dde91 Mon Sep 17 00:00:00 2001 From: Ming Du Date: Mon, 21 Jul 2025 10:08:04 -0500 Subject: [PATCH 2/2] CI: use system uv; always activate venv at each step --- .github/workflows/python-app.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4bcc639..f554712 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -76,7 +76,7 @@ jobs: - name: Install dependencies run: | - source .venv_lint/bin/activate + source .venv_pytest/bin/activate uv pip install --upgrade pip uv pip install pytest uv pip install -r requirements.txt @@ -84,12 +84,12 @@ jobs: - name: List build environment run: | - source .venv_lint/bin/activate + source .venv_pytest/bin/activate uv pip list - name: Test with pytest run: | - source .venv_lint/bin/activate + source .venv_pytest/bin/activate echo $(which python) cd tests pytest -s --high-tol