-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.19 KB
/
examples.yml
File metadata and controls
51 lines (42 loc) · 1.19 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
name: Examples
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install opencode CLI
run: npm install -g opencode-ai
- name: Start opencode serve
run: |
opencode serve &
sleep 10
echo "Server should be ready"
timeout-minutes: 2
- name: Build all examples
run: |
dotnet restore
for dir in examples/*/; do
name=$(basename "$dir")
echo "=== Building $name ==="
dotnet build "$dir" --configuration Release --no-restore
done
- name: Run all examples
run: |
for dir in examples/*/; do
name=$(basename "$dir")
echo "▶️ $name"
timeout 120 dotnet run --project "$dir" --configuration Release --no-build || echo "⚠️ $name exited with code $?"
done
continue-on-error: true
timeout-minutes: 10