From 24274fe5a540cc6da1c1637c25307c3a3b295fdd Mon Sep 17 00:00:00 2001 From: Carl Kadie Date: Thu, 17 Oct 2024 09:00:58 -0700 Subject: [PATCH] Fix CI workflow to activate virtual environment conditionally based on OS --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 610184b..6084ddd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,13 +179,14 @@ jobs: - name: Install Python ${{ matrix.python-version }} run: uv python install ${{ matrix.python-version }} - name: Setup, Lint, and Test Python + shell: bash run: | cd bed_reader uvx ruff@0.6.9 check . uvx ruff@latest check . || echo "Ignoring warnings from the latest version of ruff" uv sync --extra min_dev - source ../.venv/bin/activate + [ "$RUNNER_OS" = "Windows" ] && call .\\..\\.venv\\Scripts\\activate || source ../.venv/bin/activate pytest tests/test_opt_dep.py uv sync --extra dev --extra sparse --extra samples - source ../.venv/bin/activate + [ "$RUNNER_OS" = "Windows" ] && call .\\..\\.venv\\Scripts\\activate || source ../.venv/bin/activate pytest . \ No newline at end of file