Skip to content

Bump the python group with 4 updates #845

Bump the python group with 4 updates

Bump the python group with 4 updates #845

Workflow file for this run

# https://github.com/pre-commit/action
name: "pre-commit"
on:
push:
branches:
- main
pull_request: ~
env:
PYTHON_VERSION: 3.12.4
PRE_COMMIT_VERSION: 3.7.1
jobs:
check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.1.7
name: Checkout
- uses: actions/setup-python@v5.1.0
id: setup_python
name: Set up Python ${{ env.PYTHON_VERSION }}
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/cache@v4.0.2
id: python_package_cache
name: Cache installed Python packages
with:
key: python_packages-${{ runner.os }}-${{ env.PYTHON_VERSION }}-pre-commit-${{ env.PRE_COMMIT_VERSION }}
path: ${{ env.pythonLocation }}
restore-keys: |
python_packages-${{ runner.os }}-${{ env.PYTHON_VERSION }}-pre-commit-
- name: Install pre-commit ${{ env.PRE_COMMIT_VERSION }}
if: steps.python_package_cache.outputs.cache-hit != 'true'
run: pip install pre-commit==${{ env.PRE_COMMIT_VERSION }}
- name: pre-commit cache
id: precommit_hooks_cache
uses: actions/cache@v4.0.2
with:
path: ~/.cache/pre-commit
key: pre_commit_hooks-${{ runner.os }}-${{ env.PYTHON_VERSION }}-pre-commit-hooks-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre_commit_hooks-${{ runner.os }}-${{ env.PYTHON_VERSION }}-pre-commit-hooks-
- name: Install pre-commit hooks
if: steps.precommit_hooks_cache.outputs.cache-hit != 'true'
run: pre-commit install-hooks
- name: Run pre-commit
run: pre-commit run --all-files