From 2868a1242337942bc2700f4794721df6234b7026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9cile=20Vuilleumier?= Date: Mon, 7 Oct 2024 10:54:43 +0200 Subject: [PATCH] Use venv --- .github/workflows/main.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 171756e..f0f1fcd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,7 +12,6 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 15 if: "!startsWith(github.event.head_commit.message, '[skip ci] ')" - steps: - uses: actions/checkout@v4 - uses: camptocamp/initialise-gopass-summon-action@v2 @@ -23,16 +22,22 @@ jobs: if: env.HAS_SECRETS == 'HAS_SECRETS' - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} - - run: python3 -m pip install --user --requirement=ci/requirements.txt - + - run: | + python3 -m venv /tmp/venv + export PATH=/tmp/venv/bin:$PATH + python3 -m pip install --requirement=ci/requirements.txt + name: Install CI requirements - uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-" + env: + PATH: /tmp/venv/bin:$PATH - run: pre-commit run --all-files env: SKIP: poetry-lock,isort + PATH: /tmp/venv/bin:$PATH - run: git diff && false if: failure() @@ -45,3 +50,5 @@ jobs: - name: Publish run: c2cciutils-publish if: env.HAS_SECRETS == 'HAS_SECRETS' + env: + PATH: /tmp/venv/bin:$PATH