Skip to content

Commit

Permalink
Use venv
Browse files Browse the repository at this point in the history
  • Loading branch information
vuilleumierc committed Oct 7, 2024
1 parent 04bf9bb commit 74bd743
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,16 +22,23 @@ jobs:
if: env.HAS_SECRETS == 'HAS_SECRETS'

- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Install CI requirements
run: |
python3 -m venv /tmp/venv
python3 -m pip install --requirement=ci/requirements.txt
env:
PATH: /tmp/venv/bin:$PATH
- 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()

Expand All @@ -45,3 +51,5 @@ jobs:
- name: Publish
run: c2cciutils-publish
if: env.HAS_SECRETS == 'HAS_SECRETS'
env:
PATH: /tmp/venv/bin:$PATH

0 comments on commit 74bd743

Please sign in to comment.