Skip to content

Commit 769fff5

Browse files
committed
ci: use typecheck-only dependencies in CI
1 parent b2bd821 commit 769fff5

4 files changed

Lines changed: 51 additions & 5 deletions

File tree

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ jobs:
5555
with:
5656
version: "0.11.7"
5757
enable-cache: true
58-
- name: Install dependencies
58+
- name: Install typecheck dependencies
5959
if: steps.changes.outputs.run == 'true'
60-
run: make sync
60+
run: make sync-typecheck
6161
- name: Run typecheck
6262
if: steps.changes.outputs.run == 'true'
63-
run: make typecheck
63+
run: make typecheck-no-sync
6464
- name: Skip typecheck
6565
if: steps.changes.outputs.run != 'true'
6666
run: echo "Skipping typecheck for non-code changes."

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
.PHONY: sync
2+
UV_RUN ?= uv run
3+
24
sync:
35
uv sync --all-extras --all-packages --group dev
46

7+
.PHONY: sync-typecheck
8+
sync-typecheck:
9+
uv sync --all-extras --no-default-groups --group typecheck
10+
511
.PHONY: format
612
format:
713
uv run ruff format
@@ -17,11 +23,11 @@ lint:
1723

1824
.PHONY: mypy
1925
mypy:
20-
uv run mypy . --exclude site
26+
$(UV_RUN) mypy . --exclude site
2127

2228
.PHONY: pyright
2329
pyright:
24-
uv run pyright --project pyrightconfig.json
30+
$(UV_RUN) pyright --project pyrightconfig.json
2531

2632
.PHONY: typecheck
2733
typecheck:
@@ -36,6 +42,10 @@ typecheck:
3642
wait $$pyright_pid; \
3743
trap - EXIT
3844

45+
.PHONY: typecheck-no-sync
46+
typecheck-no-sync:
47+
$(MAKE) typecheck UV_RUN='uv run --no-sync'
48+
3949
.PHONY: tests
4050
tests: tests-parallel tests-serial
4151

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ temporal = [
6060
]
6161

6262
[dependency-groups]
63+
typecheck = [
64+
"mypy",
65+
"pyright==1.1.408",
66+
"pytest",
67+
"fastapi >= 0.110.0, <1",
68+
"aiosqlite>=0.21.0",
69+
"fakeredis>=2.31.3",
70+
"testcontainers==4.12.0",
71+
"playwright==1.50.0",
72+
"inline-snapshot>=0.20.7",
73+
"sounddevice",
74+
]
6375
dev = [
6476
"mypy",
6577
"ruff==0.9.2",

uv.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)