From 633ed2e1e683fa7e78b563087afd647bd607b49a Mon Sep 17 00:00:00 2001 From: tmadlener Date: Mon, 9 Sep 2024 14:13:34 +0200 Subject: [PATCH] Use a virtualenv to run pre-commit --- .github/workflows/pre-commit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index a8eca0932..8b0e40988 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -30,9 +30,9 @@ jobs: echo "::endgroup::" echo "::group::Run pre-commit" cd $STARTDIR - export PYTHONPATH=$(python -m site --user-site):$PYTHONPATH - export PATH=/root/.local/bin:$PATH - pip install argparse --user + python3 -m venv /root/pre-commit-venv + source /root/pre-commit-venv/bin/activate + pip install pre-commit cmake -DENABLE_SIO=ON \ -DCMAKE_CXX_STANDARD=20 \ -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror "\