]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
github-ci: run macos python jobs in virtualenv 348/head
authorJason Ish <jason.ish@oisf.net>
Wed, 27 Nov 2024 22:10:03 +0000 (16:10 -0600)
committerJason Ish <jason.ish@oisf.net>
Wed, 27 Nov 2024 22:30:07 +0000 (16:30 -0600)
With the latest brew changes, a virtualenv is required to install
pyyaml.

.github/workflows/tests.yml

index b76a66c14fab0ca29b4f9fad50cb12466ae76452..73c0630a750799764abc4cf0ddcdff131ce7fb39 100644 (file)
@@ -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