- infrastructure/proxmox/: CT provisioning configs - infrastructure/fabric/gitops/: GitOps layer - fleet.yaml: GPU inventory (Dell GTX 1050 vfio-pci passthrough) - firmware/: ESP32 firmware tree (67 files, 6.9MB) - realms/savearth/: Savearth team realm with heteronyms - lab-gateway: ESP client + manager - CI: Forgejo + GitHub Actions workflows Co-authored-by: Álvaro de Campos <campos@portugalfuturista.org>
177 lines
4.9 KiB
YAML
177 lines
4.9 KiB
YAML
name: CI — Test & Build All
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# ── aurelio-vscode: unit tests + webpack build + VSIX package ──
|
|
vscode-extension:
|
|
name: aurelio-vscode
|
|
runs-on: [self-hosted, linux, x64]
|
|
defaults:
|
|
run:
|
|
working-directory: extensions/aurelio-vscode
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- run: npm install --ignore-scripts
|
|
- name: Unit tests (mocha)
|
|
run: TS_NODE_PROJECT=./tsconfig.unit-test.json npx mocha
|
|
- name: Build (webpack)
|
|
run: npx webpack --mode production
|
|
- name: Package VSIX
|
|
run: |
|
|
npm install -g @vscode/vsce
|
|
vsce package --allow-package-secrets sendgrid
|
|
- name: Upload VSIX artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aurelio-vsix
|
|
path: extensions/aurelio-vscode/*.vsix
|
|
|
|
# ── aurelio-backend: tsc + node --test ──
|
|
backend:
|
|
name: aurelio-backend
|
|
runs-on: [self-hosted, linux, x64]
|
|
defaults:
|
|
run:
|
|
working-directory: aurelio-theia/aurelio-backend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- run: npm install --ignore-scripts
|
|
- name: TypeScript compile
|
|
run: npx tsc -p tsconfig.json
|
|
- name: Tests (node --test)
|
|
run: npm test
|
|
|
|
# ── dirac: unit tests + esbuild ──
|
|
dirac:
|
|
name: dirac
|
|
runs-on: [self-hosted, linux, x64]
|
|
defaults:
|
|
run:
|
|
working-directory: dirac
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- run: npm run install:all
|
|
- name: Protobuf codegen
|
|
run: npm run protos
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Unit tests
|
|
run: npm run test:unit
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
# ── tilth: cargo test + clippy + release build ──
|
|
tilth:
|
|
name: tilth
|
|
runs-on: [self-hosted, linux, x64]
|
|
defaults:
|
|
run:
|
|
working-directory: tilth
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Format check
|
|
run: cargo fmt --check
|
|
- name: Clippy
|
|
run: cargo clippy -- -D warnings
|
|
- name: Tests
|
|
run: cargo test
|
|
- name: Release build
|
|
run: cargo build --release
|
|
|
|
# ── toon: pnpm test + build ──
|
|
toon:
|
|
name: toon
|
|
runs-on: [self-hosted, linux, x64]
|
|
defaults:
|
|
run:
|
|
working-directory: toon
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: pnpm
|
|
cache-dependency-path: toon/pnpm-lock.yaml
|
|
- run: pnpm install
|
|
- name: Build
|
|
run: pnpm build
|
|
- name: Tests
|
|
run: pnpm test
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
# ── monorepo: provider mirrors + connector mirrors + test-all ──
|
|
monorepo:
|
|
name: monorepo (mirrors + unified tests)
|
|
runs-on: [self-hosted, linux, x64]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
- name: Provider mirrors up-to-date
|
|
run: python3 scripts/generate-provider-mirrors.py --check
|
|
- name: Connector mirrors up-to-date
|
|
run: python3 scripts/generate-connector-mirrors.py --check
|
|
- name: Mirror catalog up-to-date
|
|
run: python3 scripts/sync-mirrors.py --check
|
|
- name: Unified test runner
|
|
run: bash scripts/test-all.sh --quick
|
|
|
|
# ── deploy: VSIX to CT 205 (only on main push, after vscode-extension passes) ──
|
|
deploy-vsix:
|
|
name: Deploy VSIX to CT 205
|
|
needs: vscode-extension
|
|
runs-on: [self-hosted, linux, x64]
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: aurelio-vsix
|
|
path: /tmp/vsix
|
|
- name: Deploy to firmware store
|
|
run: |
|
|
VSIX=$(ls /tmp/vsix/*.vsix | head -1)
|
|
scp -o StrictHostKeyChecking=no "$VSIX" root@192.168.0.15:/var/www/firmware/extensions/aurelio/
|
|
echo "Deployed $(basename $VSIX) to CT 205"
|