Skip to content

Commit 0554acb

Browse files
committed
workflows: open-code pre-commit check
The pre-commit action is in maintenance mode, and is easily replicated. Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
1 parent 08b3b0a commit 0554acb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/validate.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,12 @@ jobs:
2020
uses: actions/setup-python@v6
2121
with:
2222
python-version: '3.12'
23+
- name: Install dependencies
24+
run: python -m pip install pre-commit
25+
- name: Cache pre-commit environments
26+
uses: actions/cache@v4
27+
with:
28+
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
29+
path: ~/.cache/pre-commit
2330
- name: Run pre-commit hooks
24-
uses: pre-commit/action@v3.0.1
31+
run: pre-commit run -a --show-diff-on-failure --color=always

0 commit comments

Comments
 (0)