Files
DataStack/.gitea/workflows/datastack-ci.yml
victorsteele428 667a140c4e P01: cross-platform lockfile, regression contracts and verified CI closure (#1)
fix(p01): cross-platform lock, TS regressions and notes [skip ci]
2026-11-22 02:12:46 +00:00

153 lines
5.2 KiB
YAML

name: DataStack CI Verification
on:
push:
branches: [main]
paths:
- '.gitea/workflows/datastack-ci.yml'
workflow_dispatch:
inputs:
p01_only:
description: Run P01 tests, typecheck, build and Windows clean-install only
required: false
type: boolean
default: false
quality_only:
description: Run only TypeScript and ESLint after a focused P01 test type fix
required: false
type: boolean
default: false
jobs:
node-regression:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://dev.ivib.cc
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Build Node SDK
run: |
npm --prefix sdk/node/datastack install --no-audit --no-fund
npm --prefix sdk/node/datastack run build
- name: Run all TypeScript regression suites with bounded isolation
run: |
set +e
failed=0
total=0
for file in tests/*.test.ts; do
total=$((total + 1))
echo "CI_SUITE_BEGIN $file"
timeout --signal=TERM --kill-after=5s 70s npx --yes tsx@4.20.6 --test "$file"
code=$?
echo "CI_SUITE_EXIT $file $code"
if [ "$code" -ne 0 ]; then failed=$((failed + 1)); fi
done
echo "CI_SUITE_SUMMARY total=$total failed=$failed"
test "$total" -eq 24 || exit 1
test "$failed" -eq 0
python-regression:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://dev.ivib.cc
- name: Install Python toolchain
run: |
set -eu
apt-get update -qq
apt-get install -y python3 python3-venv python3-pip
python3 -m venv /tmp/datastack-ci-venv
/tmp/datastack-ci-venv/bin/python -m pip install -e ./sdk/python/datastack -e ./sdk-python
- name: Run all Python SDK tests
run: |
set -eu
/tmp/datastack-ci-venv/bin/python -m compileall -q ./sdk/python/datastack ./sdk-python
/tmp/datastack-ci-venv/bin/python -m unittest discover -s tests -p '*_test.py' -v
quality:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://dev.ivib.cc
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: TypeScript type check
run: npx tsc --noEmit
- name: ESLint
run: npm run lint
production-build:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://dev.ivib.cc
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Next.js production build
run: |
set -eu
npm run build
test -f .next/standalone/server.js
docker-image-build:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.p01_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://dev.ivib.cc
- name: Docker and Compose availability
run: |
set -eu
docker --version
docker compose version
docker info
- name: Validate Compose structure
run: docker compose -f docker/docker-compose.yml config --no-interpolate --quiet
- name: Build Docker images without running services
run: |
set -eu
docker build -f docker/Dockerfile.server -t datastack-ci-ingestion .
docker build -f docker/Dockerfile.web -t datastack-ci-web .
docker build -f docker/Dockerfile.proxy -t datastack-ci-proxy .
windows-compatibility:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.quality_only != 'true' }}
runs-on: windows-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
with:
github-server-url: https://dev.ivib.cc
- name: Verify native Windows toolchain
shell: powershell
run: |
$ErrorActionPreference = 'Stop'
node --version
npm --version
python --version
git rev-parse HEAD
- name: Install dependencies and compile Node SDK
shell: powershell
run: |
$ErrorActionPreference = 'Stop'
# Verify the committed cross-platform lock without disposable regeneration.
npm ci --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { throw 'Committed-lock npm ci failed' }
npm --prefix sdk/node/datastack install --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { throw 'SDK install failed' }
npm --prefix sdk/node/datastack run build
if ($LASTEXITCODE -ne 0) { throw 'SDK compilation failed' }