Merge pull request #572 from first-fluke/release-please--branches--ma… #610
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} | |
| # Defense in depth: every recent Windows run has hung the vitest step and | |
| # been cancelled by the default 6-hour job timeout (issue tracked | |
| # separately). Cap at 20 min so a regression on any OS surfaces fast | |
| # instead of burning runner minutes for hours. | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Lint (cli) | |
| run: bun run --cwd cli lint | |
| - name: Boundaries (cli) | |
| run: bun run --cwd cli check:boundaries | |
| - name: Typecheck | |
| run: bun run typecheck | |
| # Windows hangs indefinitely inside vitest (root cause TBD — likely a | |
| # spawn/stdin test that never closes the loop). Skip until fixed; Lint, | |
| # Typecheck, Build, and install.ps1 smoke still validate Windows. | |
| - name: Test | |
| if: matrix.os != 'windows-latest' | |
| run: bun run test | |
| - name: Build | |
| run: bun run --cwd cli build | |
| # The full vitest suite hangs on Windows (see Test step above), but a few | |
| # files have win32-only branches that otherwise never execute on real | |
| # Windows: | |
| # - AgentMemory service generator (Task Scheduler XML + schtasks) | |
| # - oma schedule SchtasksAdapter (cron -> schtasks /Create flags, | |
| # `where oma` resolution, win32 path handling) | |
| # - schedule selectAdapter win32 -> Schtasks routing | |
| # All are pure (mocked command runners / fs, no spawn/stdin), so they run | |
| # safely here without triggering the suite-wide hang. | |
| - name: Test win32-only code paths | |
| if: matrix.os == 'windows-latest' | |
| timeout-minutes: 5 | |
| run: bun run --cwd cli test agentmemory-service.test schtasks.test schedule/port.test | |
| - name: Smoke test install.sh (skip bunx) | |
| if: matrix.os != 'windows-latest' | |
| shell: bash | |
| env: | |
| OMA_INSTALL_NO_RUN: "1" | |
| run: | | |
| bash ./cli/install.sh | |
| export PATH="${HOME}/.local/bin:${HOME}/.bun/bin:${PATH}" | |
| if ! command -v bun >/dev/null 2>&1; then | |
| echo "bun should be on PATH after install.sh" >&2 | |
| exit 1 | |
| fi | |
| if ! command -v uv >/dev/null 2>&1; then | |
| echo "uv should be on PATH after install.sh" >&2 | |
| exit 1 | |
| fi | |
| if ! command -v serena >/dev/null 2>&1; then | |
| echo "serena should be on PATH after install.sh" >&2 | |
| exit 1 | |
| fi | |
| echo "install.sh smoke test passed (bun + uv + serena resolved)" | |
| - name: Validate install.ps1 syntax | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| $errors = $null | |
| [System.Management.Automation.Language.Parser]::ParseFile( | |
| "$pwd/cli/install.ps1", [ref]$null, [ref]$errors | |
| ) | Out-Null | |
| if ($errors) { | |
| $errors | ForEach-Object { Write-Error $_.Message } | |
| exit 1 | |
| } | |
| Write-Host "install.ps1 parsed successfully" | |
| - name: Smoke test install.ps1 (skip bunx) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| env: | |
| OMA_INSTALL_NO_RUN: "1" | |
| run: | | |
| ./cli/install.ps1 | |
| if (-not (Get-Command bun -ErrorAction SilentlyContinue)) { | |
| Write-Error "bun should be on PATH after install.ps1" | |
| exit 1 | |
| } | |
| if (-not (Get-Command uv -ErrorAction SilentlyContinue)) { | |
| Write-Error "uv should be on PATH after install.ps1" | |
| exit 1 | |
| } | |
| if (-not (Get-Command serena -ErrorAction SilentlyContinue)) { | |
| Write-Error "serena should be on PATH after install.ps1" | |
| exit 1 | |
| } | |
| Write-Host "install.ps1 smoke test passed (bun + uv + serena resolved)" |