From 2a4ec086bc47d9f7c0e469996a2ed78428cd4cf0 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Wed, 29 May 2024 12:19:36 -0400 Subject: [PATCH] Install Python packages in a venv --- .github/workflows/tests.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index aa48a90b..f6d2b5f2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,7 +29,9 @@ jobs: - name: Set up system (macOS) if: startsWith(matrix.os, 'macos') run: | - python3 -m pip install datalad-container datalad-installer + python3 -m venv ~/venv + . ~/venv/bin/activate + pip install datalad-container datalad-installer datalad-installer -l DEBUG --sudo ok git-annex -m brew - name: Configure Git @@ -41,4 +43,8 @@ jobs: uses: actions/checkout@v4 - name: Test example in the README.md - run: bash <(sed -n -e '/^ *#!/,/^```$/p' README.md | grep -v '```') + run: | + if [ -d ~/venv ] + then . ~/venv/bin/activate + fi + bash <(sed -n -e '/^ *#!/,/^```$/p' README.md | grep -v '```')