forked from langchain-ai/deepagents
-
Notifications
You must be signed in to change notification settings - Fork 0
257 lines (235 loc) · 7.52 KB
/
ci.yml
File metadata and controls
257 lines (235 loc) · 7.52 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# Main CI workflow for Deep Agents monorepo
#
# Runs on every pull request:
# - Linting for changed packages
# - Unit Tests for changed packages
#
# Only packages with changes are tested. SDK changes also trigger CLI tests.
# Pushes to main and workflow changes run full CI.
name: "🔧 CI"
on:
push:
branches: [main]
pull_request:
merge_group:
# Cancel redundant workflow runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
UV_NO_SYNC: "true"
jobs:
# Detect which packages have changes
changes:
name: "🔍 Detect Changes"
runs-on: ubuntu-latest
outputs:
deepagents: ${{ steps.filter.outputs.deepagents }}
cli: ${{ steps.filter.outputs.cli }}
harbor: ${{ steps.filter.outputs.harbor }}
daytona: ${{ steps.filter.outputs.daytona }}
modal: ${{ steps.filter.outputs.modal }}
runloop: ${{ steps.filter.outputs.runloop }}
steps:
- name: "📋 Checkout Code"
uses: actions/checkout@v6
- name: "🔍 Check for changes"
uses: dorny/paths-filter@v3
id: filter
with:
# Each package filter includes workflow/action paths so that CI
# infrastructure changes are validated against all packages.
filters: |
deepagents:
- 'libs/deepagents/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
cli:
- 'libs/cli/**'
- 'libs/deepagents/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
harbor:
- 'libs/harbor/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
daytona:
- 'libs/partners/daytona/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
modal:
- 'libs/partners/modal/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
runloop:
- 'libs/partners/runloop/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
# Run linting on changed packages
lint-deepagents:
name: "🧹 Lint deepagents"
needs: changes
if: needs.changes.outputs.deepagents == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/deepagents"
python-version: "3.11"
lint-cli:
name: "🧹 Lint cli"
needs: changes
if: needs.changes.outputs.cli == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/cli"
python-version: "3.11"
lint-harbor:
name: "🧹 Lint harbor"
needs: changes
if: needs.changes.outputs.harbor == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/harbor"
python-version: "3.14"
lint-daytona:
name: "🧹 Lint daytona"
needs: changes
if: needs.changes.outputs.daytona == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/daytona"
python-version: "3.11"
lint-modal:
name: "🧹 Lint modal"
needs: changes
if: needs.changes.outputs.modal == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/modal"
python-version: "3.11"
lint-runloop:
name: "🧹 Lint runloop"
needs: changes
if: needs.changes.outputs.runloop == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/runloop"
python-version: "3.11"
# Run unit tests on changed packages
test-deepagents:
name: "🧪 Test deepagents"
needs: changes
if: needs.changes.outputs.deepagents == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/deepagents"
python-version: ${{ matrix.python-version }}
test-cli:
name: "🧪 Test cli"
needs: changes
if: needs.changes.outputs.cli == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/cli"
python-version: ${{ matrix.python-version }}
test-harbor:
name: "🧪 Test harbor"
needs: changes
if: needs.changes.outputs.harbor == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/harbor"
python-version: ${{ matrix.python-version }}
test-daytona:
name: "🧪 Test daytona"
needs: changes
if: needs.changes.outputs.daytona == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/partners/daytona"
python-version: ${{ matrix.python-version }}
test-modal:
name: "🧪 Test modal"
needs: changes
if: needs.changes.outputs.modal == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/partners/modal"
python-version: ${{ matrix.python-version }}
test-runloop:
name: "🧪 Test runloop"
needs: changes
if: needs.changes.outputs.runloop == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/partners/runloop"
python-version: ${{ matrix.python-version }}
# Final status check - ensures all jobs passed
ci_success:
name: "✅ CI Success"
needs:
- changes
- lint-deepagents
- lint-cli
- lint-harbor
- lint-daytona
- lint-modal
- lint-runloop
- test-deepagents
- test-cli
- test-harbor
- test-daytona
- test-modal
- test-runloop
if: always()
runs-on: ubuntu-latest
steps:
- name: "🎉 All Checks Passed"
run: |
# Get all job results (excluding 'changes' which always succeeds)
results='${{ toJSON(needs.*.result) }}'
echo "Job results: $results"
# Check for failures or cancellations
if echo "$results" | grep -qE '"failure"|"cancelled"'; then
echo "Some jobs failed or were cancelled"
exit 1
fi
echo "All required checks passed (skipped jobs are OK)"
exit 0