Repository navigation
59 lines (55 loc) · 2.01 KB
/
Copy pathsquad-launcher-platforms.yml
File metadata and controls
59 lines (55 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Squad launcher on Windows and Linux.
#
# `.squad/squad.mjs` and the Claude plugin's `scripts/squad.mjs` take a different path on Windows:
# npm's `squad.cmd` and `npx.cmd` shims are run through their JavaScript entry, never cmd.exe, so
# arguments arrive unchanged. The main CI runs on Linux only, so this job runs the launcher tests on
# both platforms whenever the launcher template or its tests change.
name: Squad launcher platforms
on:
pull_request:
paths:
- 'packages/squad-sdk/src/client/adapters/claude-plugin.ts'
- 'packages/squad-sdk/src/client/adapters/claude-hooks.ts'
- 'packages/squad-cli/src/cli/core/mcp-spec.ts'
- 'plugins/squad/scripts/**'
- 'test/launcher-argv.test.ts'
- 'test/portable-launch.test.ts'
- '.github/workflows/squad-launcher-platforms.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
launcher:
name: launcher (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 #v6
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
shell: bash
run: |
success=false
for i in 1 2 3; do
if npm install; then success=true; break; fi
echo "Retry $i/3 — npm install failed, retrying in 5s..."; sleep 5
done
[ "$success" = true ] || { echo "::error::npm install failed after 3 attempts"; exit 1; }
- name: Build (no version bump)
shell: bash
run: npm run build
env:
SKIP_BUILD_BUMP: '1'
- name: Launcher tests
shell: bash
run: npx vitest run test/launcher-argv.test.ts test/portable-launch.test.ts --reporter=default