-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (43 loc) · 1.11 KB
/
pre-commit.yml
File metadata and controls
54 lines (43 loc) · 1.11 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
46
47
48
49
50
51
52
53
54
name: Pre commit checks
permissions: { }
on:
push:
paths-ignore:
- docs/
branches: [ "main" ]
pull_request:
paths-ignore:
- docs/
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
name: Build and run checks
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python-version: [ "3.11" ]
steps:
- uses: actions/checkout@v5
- name: Set up project
uses: ./.github/actions/setup-project
with:
python-version: ${{ matrix.python-version }}
uv-sync-args: "--all-extras"
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml', 'uv.lock') }}
restore-keys: |
pre-commit-${{ runner.os }}-
- name: Run pre-commit
run: uv run pre-commit run --all-files --show-diff-on-failure
- name: Run mypy type checking
run: uv run mypy
- name: Build
run: |
uv build