Skip to content

Commit 14be226

Browse files
committed
Revert "Fixed GitHub workflows"
This reverts commit 6a2100b.
1 parent 6a2100b commit 14be226

File tree

2 files changed

+47
-32
lines changed

2 files changed

+47
-32
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,3 @@ jobs:
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

.github/workflows/pre-commit.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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

0 commit comments

Comments
 (0)