forked from ModelEngine-Group/unified-cache-management
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 771 Bytes
/
pre-commit.yml
File metadata and controls
31 lines (25 loc) · 771 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
name: pre-commit
on:
workflow_call:
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Add matchers for better error display
run: |
echo "::add-matcher::.github/workflows/matchers/actionlint.json"
echo "::add-matcher::.github/workflows/matchers/mypy.json"
- name: Run pre-commit checks on all files
uses: pre-commit/action@v3.0.1
env:
SHELLCHECK_OPTS: "--exclude=SC2046,SC2006,SC2086" # Exclude SC2046, SC2006, SC2086 for actionlint
with:
extra_args: --all-files --hook-stage manual