Bump actions/checkout from 4.2.0 to 4.2.2 #993
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
# https://github.com/pre-commit/action | |
name: "pre-commit" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: ~ | |
env: | |
PYTHON_VERSION: 3.13.0 | |
PRE_COMMIT_VERSION: 4.0.1 | |
jobs: | |
check: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
name: Checkout | |
- uses: actions/[email protected] | |
id: setup_python | |
name: Set up Python ${{ env.PYTHON_VERSION }} | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: actions/[email protected] | |
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/[email protected] | |
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 |