Update Python version to 3.13.0 #982
Workflow file for this run
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/checkout@v4.2.0 | |
name: Checkout | |
- uses: actions/setup-python@v5.2.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 |