-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 919 Bytes
/
Copy pathpre-commit.yml
File metadata and controls
37 lines (29 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Runs the same hooks contributors see locally (see .pre-commit-config.yaml).
name: Pre-commit
on:
push:
branches: [main, master]
pull_request:
permissions:
contents: read
concurrency:
group: pre-commit-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Shipped example config matches repo root
run: cmp -s configs/v4/.pre-commit-config.yaml .pre-commit-config.yaml
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Cache pre-commit environments
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-${{ runner.os }}-
- uses: pre-commit/action@v3.0.1