-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (117 loc) · 3.61 KB
/
ci.yml
File metadata and controls
134 lines (117 loc) · 3.61 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: ci
on:
pull_request:
paths-ignore:
- "docs/**"
- "README.md"
- "AGENTS.md"
- ".codex/**"
- ".opencode/**"
push:
branches:
- main
paths-ignore:
- "docs/**"
- "README.md"
- "AGENTS.md"
- ".codex/**"
- ".opencode/**"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
stage-1-quality:
name: Stage 1 - Quality
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
PUBLIC_CONVEX_URL: "https://example.convex.cloud"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.8
- name: Cache Bun + Turbo
uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
.turbo
key: ${{ runner.os }}-bun-turbo-${{ hashFiles('**/bun.lock', '**/bun.lockb', 'package.json', 'apps/**/package.json', 'packages/**/package.json') }}
restore-keys: |
${{ runner.os }}-bun-turbo-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Ultracite check
run: bun x ultracite check
- name: Core manual inference tests
run: |
bun test \
packages/backend/convex/manualInferenceLogic.test.ts \
apps/web/src/lib/capability.test.ts \
apps/web/src/lib/mappers.test.ts
- name: Publish summary
if: always()
run: |
echo "## Stage 1 - Quality" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "- ultracite check" >> "$GITHUB_STEP_SUMMARY"
echo "- deterministic manual inference + mapping tests" >> "$GITHUB_STEP_SUMMARY"
stage-3-build:
name: Stage 3 - Build
needs: stage-1-quality
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
PUBLIC_CONVEX_URL: "https://example.convex.cloud"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.8
- name: Cache Bun + Turbo
uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
.turbo
key: ${{ runner.os }}-bun-turbo-${{ hashFiles('**/bun.lock', '**/bun.lockb', 'package.json', 'apps/**/package.json', 'packages/**/package.json') }}
restore-keys: |
${{ runner.os }}-bun-turbo-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
- name: TUI compile smoke test
run: |
mkdir -p apps/tui/dist
bun build apps/tui/src/index.tsx --compile --outfile apps/tui/dist/cable-intel-tui
./apps/tui/dist/cable-intel-tui --help
- name: Publish summary
if: always()
run: |
echo "## Stage 3 - Build" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "- workspace build" >> "$GITHUB_STEP_SUMMARY"
echo "- TUI compile smoke test" >> "$GITHUB_STEP_SUMMARY"
checks:
name: checks
if: always()
needs:
- stage-1-quality
- stage-3-build
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Finalize staged CI result
run: |
if [ "${{ needs.stage-1-quality.result }}" != "success" ]; then
echo "Stage 1 failed."
exit 1
fi
if [ "${{ needs.stage-3-build.result }}" != "success" ]; then
echo "Stage 3 failed."
exit 1
fi
echo "All CI stages passed."