Skip to content

Commit 3dd8760

Browse files
committed
Refactor CI workflow to use conditional activation for virtual environment on Windows and Unix
1 parent 4b3d5e6 commit 3dd8760

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,16 @@ jobs:
185185
uvx ruff@0.6.9 check .
186186
uvx ruff@latest check . || echo "Ignoring warnings from the latest version of ruff"
187187
uv sync --extra min_dev
188-
[ "$RUNNER_OS" = "Windows" ] && .\\..\\.venv\\Scripts\\activate || source ../.venv/bin/activate
188+
if [ "$RUNNER_OS" = "Windows" ]; then
189+
.\\..\\.venv\\Scripts\\activate
190+
else
191+
source ../.venv/bin/activate
192+
fi
189193
pytest tests/test_opt_dep.py
190194
uv sync --extra dev --extra sparse --extra samples
191-
[ "$RUNNER_OS" = "Windows" ] && .\\..\\.venv\\Scripts\\activate || source ../.venv/bin/activate
195+
if [ "$RUNNER_OS" = "Windows" ]; then
196+
.\\..\\.venv\\Scripts\\activate
197+
else
198+
source ../.venv/bin/activate
199+
fi
192200
pytest .

0 commit comments

Comments
 (0)