Skip to content

Commit 185fa49

Browse files
authored
Use pre-commit on CI (#937)
1 parent ba149e3 commit 185fa49

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

.github/workflows/shared.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,24 @@ on:
44
workflow_call:
55

66
jobs:
7-
format:
7+
pre-commit:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
1111

12-
- name: Install uv
13-
uses: astral-sh/setup-uv@v3
12+
- uses: astral-sh/setup-uv@v5
1413
with:
1514
enable-cache: true
1615
version: 0.7.2
1716

18-
- name: Install the project
19-
run: uv sync --frozen --all-extras --dev --python 3.12
20-
21-
- name: Run ruff format check
22-
run: uv run --no-sync ruff check .
23-
24-
typecheck:
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v4
17+
- name: Install dependencies
18+
run: uv sync --frozen --all-extras --python 3.10
2819

29-
- name: Install uv
30-
uses: astral-sh/setup-uv@v3
20+
- uses: pre-commit/[email protected]
3121
with:
32-
enable-cache: true
33-
version: 0.7.2
34-
35-
- name: Install the project
36-
run: uv sync --frozen --all-extras --dev --python 3.12
37-
38-
- name: Run pyright
39-
run: uv run --no-sync pyright
22+
extra_args: --all-files --verbose
23+
env:
24+
SKIP: no-commit-to-branch
4025

4126
test:
4227
runs-on: ${{ matrix.os }}
@@ -55,7 +40,7 @@ jobs:
5540
version: 0.7.2
5641

5742
- name: Install the project
58-
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
43+
run: uv sync --frozen --all-extras --python ${{ matrix.python-version }}
5944

6045
- name: Run pytest
6146
run: uv run --no-sync pytest

0 commit comments

Comments
 (0)