Skip to content

Commit e3e5bf1

Browse files
committed
[ty] Added nox task and GH action job
1 parent 90ee1ee commit e3e5bf1

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ jobs:
7777
run: |
7878
uv run --group=type-checking mypy .
7979
80+
ty:
81+
runs-on: ubuntu-latest
82+
needs: debug
83+
steps:
84+
- uses: actions/checkout@v6
85+
- name: Install uv
86+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4, see https://github.com/astral-sh/setup-uv/releases
87+
with:
88+
version: ${{ env.UV_VERSION }}
89+
- name: Ty
90+
continue-on-error: true
91+
run: |
92+
uv run --group=type-checking ty check .
93+
8094
generate-jobs:
8195
runs-on: ubuntu-latest
8296
needs: debug

noxfile.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ def format_check(session):
173173
session.run("uv", "run", "ruff", "format", ".", "--check")
174174

175175

176+
@nox.session(venv_backend="uv", tags=["checks"])
177+
def ty(session):
178+
"""Verify type hints"""
179+
env_vars = {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}
180+
session.run_install("uv", "sync", "--group", "type-checking", env=env_vars)
181+
session.run("ty", "check", env=env_vars)
182+
183+
176184
@nox.session(venv_backend="uv", tags=["checks"])
177185
def mypy(session):
178186
"""Verify type hints"""

0 commit comments

Comments
 (0)