From ff1333d02c5c0206f51fdab77ab964dcd8eae166 Mon Sep 17 00:00:00 2001 From: victorsteele428 Date: Sun, 22 Nov 2026 05:36:57 +0600 Subject: [PATCH] ci: add isolated Windows Python SDK regression runner --- .gitea/workflows/datastack-python-ci.yml | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitea/workflows/datastack-python-ci.yml diff --git a/.gitea/workflows/datastack-python-ci.yml b/.gitea/workflows/datastack-python-ci.yml new file mode 100644 index 0000000..b8c93bc --- /dev/null +++ b/.gitea/workflows/datastack-python-ci.yml @@ -0,0 +1,38 @@ +name: DataStack Python SDK CI +on: + push: + branches: [main] + paths: + - '.gitea/workflows/datastack-python-ci.yml' + workflow_dispatch: + +jobs: + python-sdk-windows: + runs-on: windows-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + with: + github-server-url: https://dev.ivib.cc + - name: Isolated Python 3.12 environment + shell: powershell + run: | + $ErrorActionPreference = 'Stop' + python --version + $venv = Join-Path $env:RUNNER_TEMP 'datastack-python-ci' + python -m venv $venv + if ($LASTEXITCODE -ne 0) { throw 'Python virtual environment failed' } + $py = Join-Path $venv 'Scripts\python.exe' + & $py -m pip install -e ./sdk/python/datastack -e ./sdk-python + if ($LASTEXITCODE -ne 0) { throw 'Python SDK dependency install failed' } + Write-Output 'PYTHON_CI_DEPS_READY' + - name: Python SDK full regression + shell: powershell + run: | + $ErrorActionPreference = 'Stop' + $py = Join-Path $env:RUNNER_TEMP 'datastack-python-ci\Scripts\python.exe' + & $py -m compileall -q ./sdk/python/datastack ./sdk-python + if ($LASTEXITCODE -ne 0) { throw 'Python SDK compile failed' } + & $py -m unittest discover -s tests -p '*_test.py' -v + if ($LASTEXITCODE -ne 0) { throw 'Python SDK regression failed' } + Write-Output 'DATASTACK_PYTHON_REGRESSION_PASS'