File tree Expand file tree Collapse file tree 2 files changed +47
-32
lines changed Expand file tree Collapse file tree 2 files changed +47
-32
lines changed Original file line number Diff line number Diff line change 6666 with :
6767 ocaml-compiler : 5
6868 - uses : ocaml/setup-ocaml/lint-opam@v3
69-
70- hooks :
71- runs-on : ubuntu-latest
72-
73- steps :
74- # Set up Python with built-in pip caching
75- - name : Set up Python
76- id : python
77- uses : actions/setup-python@v6
78- with :
79- python-version : " 3.13"
80-
81- # Cache pre-commit’s virtual envs + hook repos
82- - name : Cache pre-commit envs
83- uses : actions/cache@v4
84- with :
85- path : ~/.cache/pre-commit
86- key : >
87- ${{ format('pre-commit-{0}-{1}',
88- steps.python.outputs.python-version,
89- hashFiles('.pre-commit-config.yaml')) }}
90-
91- # Install the tool itself
92- - name : Install pre-commit
93- run : |
94- pip install --upgrade pip pre-commit
95- pre-commit install
96-
97- # Run all hooks not already handled by other workflows
98- - name : Run hooks
99- run : |
100- pre-commit run --all-files --show-diff-on-failure --color=always
Original file line number Diff line number Diff line change 1+ ---
2+ name : pre-commit
3+ permissions :
4+ contents : read
5+
6+ on :
7+ push :
8+ branches :
9+ - " master"
10+ pull_request :
11+
12+ jobs :
13+ hooks :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ # Get the code
18+ - name : Checkout
19+ uses : actions/checkout@v5
20+
21+ # Set up Python with built-in pip caching
22+ - name : Set up Python
23+ id : python
24+ uses : actions/setup-python@v6
25+ with :
26+ python-version : " 3.13"
27+
28+ # Cache pre-commit’s virtual envs + hook repos
29+ - name : Cache pre-commit envs
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.cache/pre-commit
33+ key : >
34+ ${{ format('pre-commit-{0}-{1}',
35+ steps.python.outputs.python-version,
36+ hashFiles('.pre-commit-config.yaml')) }}
37+
38+ # Install the tool itself
39+ - name : Install pre-commit
40+ run : |
41+ pip install --upgrade pip pre-commit
42+ pre-commit install
43+
44+ # Run all hooks not already handled by other workflows
45+ - name : Run hooks
46+ run : |
47+ pre-commit run --all-files --show-diff-on-failure --color=always
You can’t perform that action at this time.
0 commit comments