From: Jason Ish Date: Wed, 27 Nov 2024 22:10:03 +0000 (-0600) Subject: github-ci: run macos python jobs in virtualenv X-Git-Tag: 1.3.4~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F348%2Fhead;p=thirdparty%2Fsuricata-update.git github-ci: run macos python jobs in virtualenv With the latest brew changes, a virtualenv is required to install pyyaml. --- diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b76a66c..73c0630 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -211,8 +211,17 @@ jobs: runs-on: macos-latest steps: - run: brew install python - - run: pip3 install PyYAML - - run: pip3 install pytest + - run: brew install pytest - uses: actions/checkout@v1 - - run: PYTHONPATH=. python3 -m pytest - - run: PYTHONPATH=. python3 ./tests/integration_tests.py + - name: Create Python virtual environment + run: python3 -m venv ./testenv + - name: Install PyYAML + run: | + . ./testenv/bin/activate + pip install pyyaml + - run: | + . ./testenv/bin/activate + PYTHONPATH=. pytest + - run: | + . ./testenv/bin/activate + PYTHONPATH=. python3 ./tests/integration_tests.py