mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
ci-lint - add ty type check
This commit is contained in:
@@ -30,6 +30,7 @@ jobs:
|
|||||||
uv tool install ruff
|
uv tool install ruff
|
||||||
uv tool install black
|
uv tool install black
|
||||||
uv tool install poethepoet
|
uv tool install poethepoet
|
||||||
|
uv tool install ty
|
||||||
|
|
||||||
# black doesn't catch all syntax errors, so we check them explicitly.
|
# black doesn't catch all syntax errors, so we check them explicitly.
|
||||||
- name: Check syntax errors
|
- name: Check syntax errors
|
||||||
@@ -57,6 +58,13 @@ jobs:
|
|||||||
black --diff --check . | black-codeclimate | python .github/workflows/black_to_github_annotations.py
|
black --diff --check . | black-codeclimate | python .github/workflows/black_to_github_annotations.py
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: ty check
|
||||||
|
id: ty
|
||||||
|
run: |
|
||||||
|
poe ty-venv
|
||||||
|
poe ty
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Ruff check
|
- name: Ruff check
|
||||||
id: ruff
|
id: ruff
|
||||||
run: |
|
run: |
|
||||||
@@ -105,4 +113,7 @@ jobs:
|
|||||||
if [ "${{ steps.ruff.outcome }}" != "success" ]; then
|
if [ "${{ steps.ruff.outcome }}" != "success" ]; then
|
||||||
echo "::error::Ruff check failed, see Summary or 'ruff' step for the details." && ERROR=1
|
echo "::error::Ruff check failed, see Summary or 'ruff' step for the details." && ERROR=1
|
||||||
fi
|
fi
|
||||||
|
if [ "${{ steps.ty.outcome }}" != "success" ]; then
|
||||||
|
echo "::error::ty check failed, see 'ty check' step for the details." && ERROR=1
|
||||||
|
fi
|
||||||
exit $ERROR
|
exit $ERROR
|
||||||
|
|||||||
+2
-1
@@ -5,6 +5,7 @@ dependencies = [
|
|||||||
"black==26.3.1",
|
"black==26.3.1",
|
||||||
"ruff==0.15.9",
|
"ruff==0.15.9",
|
||||||
"poethepoet",
|
"poethepoet",
|
||||||
|
"ty==0.0.29",
|
||||||
"gersemi==0.26.1",
|
"gersemi==0.26.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -227,7 +228,7 @@ ty.sequence = ["ty-bonsai", "ty-ios"]
|
|||||||
ty.help = "Run ty type checker. Requires ty-venv to be set up first."
|
ty.help = "Run ty type checker. Requires ty-venv to be set up first."
|
||||||
ty-bonsai = "ty check src/bonsai --python=src/bonsai/.venv"
|
ty-bonsai = "ty check src/bonsai --python=src/bonsai/.venv"
|
||||||
|
|
||||||
ty-venv.sequence = ["ty-venv-bonsai", "ty-venv-ios"]
|
ty-venv.sequence = ["bonsai-deps", "ty-venv-bonsai", "ty-venv-ios"]
|
||||||
|
|
||||||
ty-venv-bonsai.sequence = [
|
ty-venv-bonsai.sequence = [
|
||||||
{cmd = "uv venv src/bonsai/.venv --python=3.11 --allow-existing"},
|
{cmd = "uv venv src/bonsai/.venv --python=3.11 --allow-existing"},
|
||||||
|
|||||||
Reference in New Issue
Block a user