Files
DataStack/.gitea/workflows/datastack-ci.yml
T
victorsteele428 d3a93c64bd
DataStack CI Verification / windows-compatibility (push) Successful in 6m15s
DataStack CI Verification / node-regression (push) Failing after 10m10s
DataStack CI Verification / python-regression (push) Failing after 20s
DataStack CI Verification / quality (push) Failing after 2m23s
DataStack CI Verification / production-build (push) Successful in 6m44s
DataStack CI Verification / docker-image-build (push) Failing after 9s
ci: isolate test suites and collect diagnostic runner results
2026-11-22 05:24:44 +06:00

140 lines
4.6 KiB
YAML

name: DataStack CI Verification
on:
push:
branches: [main]
paths:
- '.gitea/workflows/datastack-ci.yml'
workflow_dispatch:
jobs:
node-regression:
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:
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:
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:
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:
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'
# Diagnostic only: regenerate the lock in the disposable runner checkout.
# The tracked repository lock remains unchanged for the later bug-fix phase.
npm install --package-lock-only --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { throw 'Temporary lock regeneration failed' }
npm ci --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { throw 'Diagnostic npm install 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' }