-
-
Notifications
You must be signed in to change notification settings - Fork 46
29 lines (24 loc) · 820 Bytes
/
pre-commit-ci.yml
File metadata and controls
29 lines (24 loc) · 820 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
name: pre-commit-ci
on: [push, pull_request, workflow_dispatch]
jobs:
pre-commit:
name: "Pre-commit checks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup_python
with:
python-version: "3.12"
- name: Install pre-commit
run: pip install pre-commit
- name: Cache pre-commit tools
uses: actions/cache@v4
with:
key: pre-commit-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure
- name: Run pre-commit-ci-lite
uses: pre-commit-ci/lite-action@v1.0.2
if: always()