diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ba27c3d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + test: + name: build & test (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + env: + # The unit tests + tsc don't need the Electron/Playwright binaries — skip the heavy downloads. + ELECTRON_SKIP_BINARY_DOWNLOAD: '1' + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: npm run build + - run: npm test + # Verify the macOS launcher's generated AppleScript compiles on a real Mac (no GUI needed). + - name: Validate generated AppleScript compiles + if: runner.os == 'macOS' + run: node scripts/check-applescript.mjs diff --git a/README.md b/README.md index 39cfd79..4144640 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,11 @@ If you run Claude Code across a dozen side projects, you lose the thread: *Which | OS | Status | |----|--------| -| Windows | ✅ Supported | -| macOS / Linux | ⏳ Planned — the terminal launcher is currently Windows-only (`wt.exe` / PowerShell). PRs welcome. | +| Windows | ✅ Supported — Windows Terminal / PowerShell. Packaged release available. | +| macOS | ✅ Supported (beta) — opens Terminal.app via `osascript`. Run from source for now. Launcher logic + AppleScript are CI-verified on real macOS runners; the GUI flow hasn't been hardware-tested yet — feedback welcome. | +| Linux | ✅ Supported (beta) — auto-detects `gnome-terminal` / `konsole` / `alacritty` / `kitty` / `xterm` (and `x-terminal-emulator`). Run from source. | + +> Packaged installers are Windows-only so far; on macOS/Linux, run from source (`npm start`). CI (GitHub Actions) builds + tests on Windows, macOS, and Linux on every push. ## Build from source diff --git a/scripts/check-applescript.mjs b/scripts/check-applescript.mjs new file mode 100644 index 0000000..0a49d19 --- /dev/null +++ b/scripts/check-applescript.mjs @@ -0,0 +1,18 @@ +// macOS-only CI check: validate that the AppleScript DevDeck actually generates +// COMPILES on a real Mac (via osacompile) — no GUI/window server required. Imports +// the real builder so the check can never drift from the shipped code. +import { buildMacLaunch } from '../dist/shared/posixLaunch.js'; +import { execFileSync } from 'node:child_process'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; + +const [cmd] = buildMacLaunch([{ name: 'x', dir: '/tmp/x', command: 'claude -c' }]); +// Re-extract the `-e