-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,17 +18,17 @@ jobs: | |
python -m pip install --upgrade pip | ||
pip install pre-commit | ||
# Install pre-commit hooks (this will create the necessary cache directories) | ||
- name: Install pre-commit hooks | ||
run: pre-commit install | ||
|
||
# Step to fix 'python_venv' language to 'python' in .pre-commit-hooks.yaml | ||
- name: Fix 'python_venv' language to 'python' in .pre-commit-hooks.yaml | ||
run: | | ||
echo "Fixing pre-commit hook language..." | ||
# Modify the cached pre-commit-hooks.yaml files before installation | ||
# Now that pre-commit hooks are installed, modify the cached .pre-commit-hooks.yaml files | ||
find ~/.cache/pre-commit/ -type f -name '.pre-commit-hooks.yaml' -exec sed -i 's/python_venv/python/g' {} + | ||
# Install pre-commit hooks after fixing language key | ||
- name: Install pre-commit hooks | ||
run: pre-commit install | ||
|
||
# Run pre-commit action | ||
- name: Run pre-commit checks | ||
uses: pre-commit/[email protected] | ||
|