forked from tudat-team/tudatpy
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (21 loc) · 786 Bytes
/
Copy pathpre-commit.yml
File metadata and controls
30 lines (21 loc) · 786 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
# Derived from official pre-commit action, which is maintenance only but no longer merges PRs: https://github.com/pre-commit/action/blob/1b06ec171f2f6faa71ed760c4042bd969e4f8b43/action.yml
name: pre-commit
on:
push:
pull_request:
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- run: python -m pip install pre-commit
- run: python -m pip freeze --local
- uses: actions/cache@v5
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always --all-files