-
Notifications
You must be signed in to change notification settings - Fork 35
45 lines (41 loc) · 1.17 KB
/
precommit.yaml
File metadata and controls
45 lines (41 loc) · 1.17 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: precommit
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
- develop
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
pre-commit:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: Pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
cache-suffix: precommit
activate-environment: true
- name: Install dependencies
run: |
uv sync --extra dev --extra spatiotemporal
- name: Run pre-commit
run: uv run pre-commit run --hook-stage manual --all-files