Files
aitbc/.gitea/workflows/package-tests.yml
aitbc 23348892b9
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Failing after 36s
CLI Tests / test-cli (push) Failing after 3m9s
Documentation Validation / validate-docs (push) Successful in 8s
Integration Tests / test-service-integration (push) Failing after 3s
JavaScript SDK Tests / test-js-sdk (push) Successful in 7s
Package Tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk]) (push) Failing after 8s
Package Tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core]) (push) Failing after 29s
Package Tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto]) (push) Failing after 13s
Package Tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk]) (push) Failing after 16s
Package Tests / test-javascript-packages (map[name:aitbc-sdk-js path:packages/js/aitbc-sdk]) (push) Successful in 7s
Package Tests / test-javascript-packages (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Failing after 18s
Python Tests / test-python (push) Failing after 3m37s
Rust ZK Components Tests / test-rust-zk (push) Successful in 28s
Security Scanning / security-scan (push) Failing after 46s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Failing after 18s
Smart Contract Tests / test-solidity (map[name:zk-circuits path:apps/zk-circuits]) (push) Failing after 43s
Smart Contract Tests / lint-solidity (push) Failing after 12s
Staking Tests / test-staking-service (push) Failing after 2m33s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Systemd Sync / sync-systemd (push) Failing after 4s
ci: enforce strict exit codes in workflow tests
- Remove `|| echo "⚠️ ..."` fallbacks that masked failures
- Add explicit `exit 1` on port readiness failures and missing test directories
- Track port_ready flag in health check loops to fail if services don't start
- Replace warning emoji (⚠️) with error emoji () for actual failures
- Fix docs-validation to use curated Markdown target list excluding high-noise directories
- Update rust-zk-tests paths from gpu_acceleration/research to dev
2026-04-18 11:57:35 +02:00

166 lines
5.0 KiB
YAML

name: Package Tests
on:
push:
branches: [main, develop]
paths:
- 'packages/**'
- 'pyproject.toml'
- '.gitea/workflows/package-tests.yml'
pull_request:
branches: [main, develop]
workflow_dispatch:
concurrency:
group: package-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
test-python-packages:
runs-on: debian
timeout-minutes: 15
strategy:
matrix:
package:
- name: "aitbc-core"
path: "packages/py/aitbc-core"
- name: "aitbc-crypto"
path: "packages/py/aitbc-crypto"
- name: "aitbc-sdk"
path: "packages/py/aitbc-sdk"
- name: "aitbc-agent-sdk"
path: "packages/py/aitbc-agent-sdk"
steps:
- name: Clone repository
run: |
WORKSPACE="/var/lib/aitbc-workspaces/pkg-${{ matrix.package.name }}"
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
- name: Setup and test package
run: |
WORKSPACE="/var/lib/aitbc-workspaces/pkg-${{ matrix.package.name }}"
cd "$WORKSPACE/repo/${{ matrix.package.path }}"
echo "=== Testing ${{ matrix.package.name }} ==="
echo "Directory: $(pwd)"
ls -la
# Ensure standard directories exist
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
# Create venv
python3 -m venv venv
source venv/bin/activate
pip install -q --upgrade pip setuptools wheel
# Install dependencies
if [[ -f "pyproject.toml" ]]; then
pip install -q -e ".[dev]" 2>/dev/null || pip install -q -e .
fi
if [[ -f "requirements.txt" ]]; then
pip install -q -r requirements.txt
fi
pip install -q pytest mypy black
# Linting
echo "=== Linting ==="
if [[ -d "src" ]]; then
mypy src/ --ignore-missing-imports --no-error-summary 2>/dev/null || echo "⚠️ MyPy warnings"
black --check src/ 2>/dev/null || echo "⚠️ Black warnings"
fi
# Tests
echo "=== Tests ==="
if [[ -d "tests" ]]; then
pytest tests/ -q --tb=short
else
echo "⚠️ No tests directory found"
fi
echo "✅ ${{ matrix.package.name }} testing completed"
- name: Build package
run: |
WORKSPACE="/var/lib/aitbc-workspaces/pkg-${{ matrix.package.name }}"
cd "$WORKSPACE/repo/${{ matrix.package.path }}"
if [[ -f "pyproject.toml" ]]; then
python3 -m venv venv
source venv/bin/activate
pip install -q build
python -m build
echo "✅ Package built"
fi
- name: Cleanup
if: always()
run: rm -rf "/var/lib/aitbc-workspaces/pkg-${{ matrix.package.name }}"
test-javascript-packages:
runs-on: debian
timeout-minutes: 15
strategy:
matrix:
package:
- name: "aitbc-sdk-js"
path: "packages/js/aitbc-sdk"
- name: "aitbc-token"
path: "packages/solidity/aitbc-token"
steps:
- name: Clone repository
run: |
WORKSPACE="/var/lib/aitbc-workspaces/jspkg-${{ matrix.package.name }}"
rm -rf "$WORKSPACE"
mkdir -p "$WORKSPACE"
cd "$WORKSPACE"
git clone --depth 1 http://gitea.bubuit.net:3000/oib/aitbc.git repo
- name: Setup and test package
run: |
WORKSPACE="/var/lib/aitbc-workspaces/jspkg-${{ matrix.package.name }}"
cd "$WORKSPACE/repo/${{ matrix.package.path }}"
echo "=== Testing ${{ matrix.package.name }} ==="
if [[ ! -f "package.json" ]]; then
echo "⚠️ No package.json found, skipping"
exit 0
fi
node --version
npm --version
npm install --legacy-peer-deps 2>/dev/null || npm install
# Fix missing Hardhat dependencies for aitbc-token
if [[ "${{ matrix.package.name }}" == "aitbc-token" ]]; then
echo "Installing missing Hardhat dependencies..."
npm install --save-dev "@nomicfoundation/hardhat-ignition@^0.15.16" "@nomicfoundation/ignition-core@^0.15.15" 2>/dev/null || true
# Fix formatting issues
echo "Fixing formatting issues..."
npm run format 2>/dev/null || echo "⚠️ Format fix failed"
fi
# Build
npm run build
echo "✅ Build passed"
# Lint
npm run lint 2>/dev/null && echo "✅ Lint passed" || echo "⚠️ Lint skipped"
# Test
npm test
echo "✅ Tests passed"
echo "✅ ${{ matrix.package.name }} completed"
- name: Cleanup
if: always()
run: rm -rf "/var/lib/aitbc-workspaces/jspkg-${{ matrix.package.name }}"