mirror of
https://github.com/exo-explore/exo.git
synced 2025-12-23 22:27:50 -05:00
Add Type Checker In CI
This commit is contained in:
38
.github/workflows/type-check.yml
vendored
Normal file
38
.github/workflows/type-check.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: type-check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- staging
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- staging
|
||||
- main
|
||||
|
||||
jobs:
|
||||
typecheck:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: uv.lock
|
||||
|
||||
- name: Install Python
|
||||
run: uv python install
|
||||
|
||||
- name: Sync dependencies
|
||||
run: uv sync --locked --all-extras --dev
|
||||
|
||||
- name: Run type checker
|
||||
run: uv run poe check
|
||||
@@ -8,6 +8,7 @@ dependencies = []
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"basedpyright>=1.29.4",
|
||||
"poethepoet>=0.35.0",
|
||||
"pytest>=8.4.0",
|
||||
"ruff>=0.11.13",
|
||||
@@ -18,6 +19,24 @@ members = [
|
||||
"master", "worker", "shared",
|
||||
]
|
||||
|
||||
[tool.basedpyright]
|
||||
typeCheckingMode = "strict"
|
||||
failOnWarnings = true
|
||||
|
||||
reportAny = "error"
|
||||
reportUnknownVariableType = "error"
|
||||
reportUnknownParameterType = "error"
|
||||
reportMissingParameterType = "error"
|
||||
reportMissingTypeStubs = "error"
|
||||
reportInvalidCast = "error"
|
||||
reportUnnecessaryCast = "error"
|
||||
reportUnnecessaryTypeIgnoreComment = "error"
|
||||
|
||||
include = ["master", "worker", "shared", "engines/*"]
|
||||
pythonVersion = "3.13"
|
||||
pythonPlatform = "Darwin"
|
||||
|
||||
[tool.poe.tasks]
|
||||
fmt = { shell = "ruff format .", help = "Format the code" }
|
||||
test = { shell = "pytest master worker shared", help = "Run the tests" }
|
||||
test = { shell = "pytest master worker shared", help = "Run the tests" }
|
||||
check = { shell = "basedpyright --project .", help = "Run type checker" }
|
||||
Reference in New Issue
Block a user