-
-
Notifications
You must be signed in to change notification settings - Fork 708
106 lines (91 loc) · 3.26 KB
/
cross-platform-bob.yml
File metadata and controls
106 lines (91 loc) · 3.26 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Cross-Platform Bob Tests
# Story 12.11 - CI/CD Pipeline for Bob
# Tests pm.sh and terminal-spawner across OS matrix
# Validates Story 12.10 AC11 (CI validation deferred to this story)
on:
pull_request:
branches:
- main
paths:
- '.aiox-core/scripts/pm.sh'
- '.aiox-core/core/orchestration/terminal-spawner.js'
- 'tests/core/orchestration/terminal-spawner.test.js'
concurrency:
group: cross-platform-bob-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
env:
NODE_VERSION: '20'
jobs:
terminal-spawner-matrix:
name: Terminal Spawner (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Run terminal-spawner tests
run: npx jest tests/core/orchestration/terminal-spawner.test.js --verbose
- name: Verify pm.sh exists and is executable (Unix)
if: runner.os != 'Windows'
run: |
echo "=== pm.sh Validation (${{ matrix.os }}) ==="
if [ -f ".aiox-core/scripts/pm.sh" ]; then
echo "✅ pm.sh found"
chmod +x .aiox-core/scripts/pm.sh
# Syntax check only (don't execute — requires full environment)
bash -n .aiox-core/scripts/pm.sh && echo "✅ pm.sh syntax valid" || echo "❌ pm.sh syntax error"
else
echo "❌ pm.sh not found"
exit 1
fi
- name: Verify fallback inline mode (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "=== Fallback Inline Validation (Windows) ==="
if (Test-Path ".aiox-core/scripts/pm.sh") {
Write-Host "✅ pm.sh found (will use fallback inline on Windows)"
} else {
Write-Host "❌ pm.sh not found"
exit 1
}
# Terminal-spawner tests already validate fallback mode
Write-Host "✅ Windows fallback validated via terminal-spawner tests"
- name: Annotate result
if: always()
run: |
echo "::notice title=Cross-Platform Result (${{ matrix.os }})::Terminal spawner tests completed on ${{ matrix.os }}"
summary:
name: Cross-Platform Summary
needs: terminal-spawner-matrix
if: always()
runs-on: ubuntu-latest
steps:
- name: Report results
run: |
echo "=== Cross-Platform Bob Test Summary ==="
echo ""
echo "Matrix results:"
echo " Ubuntu: ${{ needs.terminal-spawner-matrix.result }}"
echo " macOS: ${{ needs.terminal-spawner-matrix.result }}"
echo " Windows: ${{ needs.terminal-spawner-matrix.result }}"
echo ""
if [ "${{ needs.terminal-spawner-matrix.result }}" = "failure" ]; then
echo "❌ One or more platforms failed"
exit 1
fi
echo "✅ All platforms passed"