refactor(cli): Fastify dashboard + SshDeploymentService decomposition, atop compact redesign #107
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint (oxlint) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.13 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run lint | |
| typecheck: | |
| name: Type Check | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.13 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run core:typecheck | |
| - run: bun run core:build | |
| - run: bun run cli:typecheck | |
| - run: bun run typecheck | |
| - run: bun run --cwd agent typecheck | |
| test: | |
| name: Tests | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.13 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run core:test | |
| - run: bun run --cwd packages/frontend test | |
| - run: bun run --cwd agent test | |
| cli: | |
| name: CLI tests + release archives | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.13 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run core:build | |
| - run: bun run cli:typecheck | |
| - run: bun run cli:test | |
| - name: Build and inspect release archives | |
| env: | |
| MIOBRIDGE_RELEASE_VERSION: 0.0.0-ci | |
| run: | | |
| set -euo pipefail | |
| bun run cli:release | |
| for arch in x64 arm64; do | |
| archive="dist/cli-release/miobridge-0.0.0-ci-linux-$arch.tar.gz" | |
| test -f "$archive" | |
| tar -tzf "$archive" | grep -Fx 'VERSION' | |
| tar -tzf "$archive" | grep -Fx 'miobridge' | |
| tar -tzf "$archive" | grep -Fx 'dashboard/provider.json' | |
| tar -tzf "$archive" | grep -Fx 'dashboard/artifact/index.html' | |
| mkdir -p "$RUNNER_TEMP/$arch" | |
| tar -xzf "$archive" -C "$RUNNER_TEMP/$arch" | |
| test -x "$RUNNER_TEMP/$arch/miobridge" | |
| done | |
| grep -F 'miobridge-0.0.0-ci-linux-x64.tar.gz' dist/cli-release/SHA256SUMS | |
| grep -F 'miobridge-0.0.0-ci-linux-arm64.tar.gz' dist/cli-release/SHA256SUMS | |
| for arch in x64 arm64; do | |
| agent="dist/cli-release/miobridge-agent-0.0.0-ci-linux-$arch.gz" | |
| gzip -t "$agent" | |
| grep -F "$(basename "$agent")" dist/cli-release/SHA256SUMS | |
| done | |
| gzip -dc dist/cli-release/miobridge-agent-0.0.0-ci-linux-x64.gz > "$RUNNER_TEMP/miobridge-agent" | |
| chmod 0755 "$RUNNER_TEMP/miobridge-agent" | |
| test "$("$RUNNER_TEMP/miobridge-agent" --version)" = 0.0.0-ci | |
| sh -n dist/cli-release/install.sh | |
| grep -F 'install.sh' dist/cli-release/SHA256SUMS | |
| sh -n dist/cli-release/install-agent.sh | |
| grep -F 'install-agent.sh' dist/cli-release/SHA256SUMS | |
| build: | |
| name: Build (Vite SPA) | |
| needs: [typecheck, test] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.13 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| - name: Verify Vite bundle boundary | |
| run: | | |
| set -euo pipefail | |
| DIST=packages/frontend/dist | |
| test -f "$DIST/index.html" | |
| test -d "$DIST/assets" | |
| if rg -l '@miobridge/core|node:fs|node:child_process|MioBridgeCore' "$DIST" 2>/dev/null; then | |
| echo "Node-only marker found in client bundle" >&2 | |
| exit 1 | |
| fi | |
| echo "Bundle boundary clean" | |
| dashboard-e2e: | |
| name: Dashboard E2E (Playwright) | |
| needs: [typecheck, test] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.13 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run e2e:prepare | |
| - run: bun run --cwd packages/e2e browser:install:ci | |
| - run: bun run --cwd packages/e2e typecheck | |
| - run: bun run --cwd packages/e2e test | |
| - name: Upload Playwright reports and failure evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dashboard-playwright-report | |
| path: packages/e2e/.artifacts | |
| if-no-files-found: warn | |
| retention-days: 14 |