Skip to content

Commit

Permalink
Use a virtualenv to install pre-commit (#654)
Browse files Browse the repository at this point in the history
Avoid running into issues with underlying python packages
  • Loading branch information
tmadlener authored Aug 21, 2024
1 parent 1dd23df commit 6361dfd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ jobs:
view-path: /cvmfs/sw-nightlies.hsf.org/key4hep
run: |
echo "::group::Setup pre-commit"
export PATH=/root/.local/bin:$PATH
# Newer versions of git are more cautious around the github runner
# environment and without this git rev-parse --show-cdup in pre-commit
# fails
git config --global --add safe.directory $(pwd)
python -m venv /root/pre-commit-venv
source /root/pre-commit-venv/bin/activate
pip install pre-commit
pip install pylint==2.17.7
pip install flake8
Expand Down

0 comments on commit 6361dfd

Please # to comment.