-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.07 KB
/
Copy pathci-pre-commit-checks.yaml
File metadata and controls
47 lines (39 loc) · 1.07 KB
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
38
39
40
41
42
43
44
45
46
47
---
name: "CI: Pre-Commit Checks"
on:
pull_request: {}
push:
branches: [main]
permissions: {}
concurrency:
group: pre-commit-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
name: Pre-Commit Checks
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Cache pre-commit environments
uses: actions/cache@v6
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-${{ runner.os }}-
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
- name: Run pre-commit (all files)
run: |
set -euo pipefail
pre-commit run --all-files --show-diff-on-failure