Update version #339
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
name: precommit | |
on: [push, pull_request] | |
jobs: | |
precommit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache pre-commit # taken from https://github.com/pre-commit/action/blob/main/action.yml | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "0.4.20" | |
enable-cache: true | |
- name: Install pre-commit | |
run: uv tool install pre-commit --with pre-commit-uv | |
- name: Run pre-commit | |
run: uv tool run pre-commit run --show-diff-on-failure --color=always --all-files |