diff options
author | PatTheMav <PatTheMav@users.noreply.github.com> | 2024-02-27 16:38:53 +0100 |
---|---|---|
committer | Ryan Foster <ryan@obsproject.com> | 2024-02-27 14:50:02 -0500 |
commit | 629b60f328acac0935ecbc57dd728187f09a0317 (patch) | |
tree | 8f4ff7c6e8193872c91278d747e81e36883ba23a | |
parent | 193019d214ed655908b81a9ce01d9ae48030898a (diff) |
CI: Fix broken pip install to use ephemeral virtual environment
Python 3.11 and later support a system-wide configuration setting that
marks the system packages as "externally managed" (e.g. to force using
apt packages instead of pip packages).
This breaks installation of the modules necessary to run the validators,
so use a virtual environment instead.
-rw-r--r-- | .github/actions/compatibility-validator/action.yaml | 5 | ||||
-rw-r--r-- | .github/actions/services-validator/action.yaml | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/.github/actions/compatibility-validator/action.yaml b/.github/actions/compatibility-validator/action.yaml index 0af5af1a3..a133e70a1 100644 --- a/.github/actions/compatibility-validator/action.yaml +++ b/.github/actions/compatibility-validator/action.yaml @@ -31,6 +31,10 @@ runs: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH fi brew install --quiet python3 + + python3 -m venv .venv + + source .venv/bin/activate python3 -m pip install jsonschema json_source_map echo ::endgroup:: @@ -43,6 +47,7 @@ runs: shopt -s extglob echo ::group::Schema Validation + source .venv/bin/activate python3 -u \ .github/scripts/utils.py/check-jsonschema.py \ --loglevel INFO \ diff --git a/.github/actions/services-validator/action.yaml b/.github/actions/services-validator/action.yaml index 31654ac47..9a691acb3 100644 --- a/.github/actions/services-validator/action.yaml +++ b/.github/actions/services-validator/action.yaml @@ -53,6 +53,10 @@ runs: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH brew install --overwrite --quiet python3 fi + + python3 -m venv .venv + + source .venv/bin/activate python3 -m pip install jsonschema json_source_map requests aiohttp echo ::endgroup:: @@ -66,6 +70,8 @@ runs: shopt -s extglob echo ::group::Run Validation + + source .venv/bin/activate python3 -u \ .github/scripts/utils.py/check-jsonschema.py \ plugins/rtmp-services/data/@(services|package).json \ @@ -101,6 +107,8 @@ runs: API_SERVERS: ${{ inputs.checkApiServers }} run: | : Check for defunct services 📉 + + source .venv/bin/activate python3 -u .github/scripts/utils.py/check-services.py - uses: actions/upload-artifact@v4 |