From 406962287c7479f62200af9ed36be47cf5d616e7 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 30 Apr 2025 14:48:14 +0500 Subject: [PATCH] ci-black-formatting - check syntax errors explicitly --- .github/workflows/ci-black-formatting.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci-black-formatting.yaml b/.github/workflows/ci-black-formatting.yaml index b1d3295c1b..4806236e9a 100644 --- a/.github/workflows/ci-black-formatting.yaml +++ b/.github/workflows/ci-black-formatting.yaml @@ -32,6 +32,19 @@ jobs: # run: | # python3 -m black . + # black doesn't catch all syntax erors, so we check them explicitly. + - name: Check syntax errors + shell: sh + id: syntax-errors + run: | + ERROR=0 + python3 -W error -m compileall -q src/ifcopenshell-python || ERROR=1 + python3 -W error -m compileall -q src/bonsai || ERROR=1 + if [ $ERROR -ne 0 ]; then \ + echo "One or more tests failed"; \ + exit 1; \ + fi + # QA STEP - name: QA Step - check linting shell: bash