-
Notifications
You must be signed in to change notification settings - Fork 19
35 lines (32 loc) · 944 Bytes
/
pre-commit.yml
File metadata and controls
35 lines (32 loc) · 944 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
# SPDX-FileCopyrightText: 2026 Brendan Doherty
#
# SPDX-License-Identifier: MIT
name: Pre-commit Hooks
on: [push]
# Do not inherit GITHUB_TOKEN permissions, for security purposes.
# These will be explicitly granted per job (if/when needed)
permissions: {}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
id: setup-python
with:
python-version: '3.x'
- name: Cache pre-commit venv
uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}-${{ steps.setup-python.outputs.python-version }}
- name: Run pre-commit
run: >-
pipx run
pre-commit run
--all-files
--show-diff-on-failure
--color always