1
+ name : Smoke
2
+
3
+ on :
4
+ push :
5
+ branches : main
6
+ pull_request :
7
+ branches : main
8
+ schedule :
9
+ - cron : ' 0 0 * * *' # Run daily at midnight UTC
10
+
11
+ jobs :
12
+ smoke :
13
+ name : ${{ matrix.os }} / Node ${{ matrix.node }} / Python ${{ matrix.python }}
14
+ runs-on : ${{ matrix.os }}
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ os : [ubuntu-latest, windows-latest, macos-latest]
19
+ node : [20, 22]
20
+ python : [3.11, 3.12]
21
+
22
+ steps :
23
+ - name : Checkout
24
+ uses : actions/checkout@v4
25
+
26
+ - name : Setup Node.js
27
+ uses : actions/setup-node@v4
28
+ with :
29
+ node-version : ${{ matrix.node }}
30
+
31
+ - name : Setup Python
32
+ uses : actions/setup-python@v4
33
+ with :
34
+ python-version : ${{ matrix.python }}
35
+
36
+ - name : Install Node.js dependencies (root)
37
+ run : npm install
38
+
39
+ - name : Install Node.js dependencies (agent)
40
+ run : |
41
+ cd agent
42
+ npm install
43
+
44
+ - name : Install Python dependencies (agent)
45
+ run : |
46
+ cd agent
47
+ pip install -r requirements.txt
48
+
49
+ - name : Build frontend
50
+ run : npm run build
51
+
52
+ - name : Test frontend startup (Linux/macOS)
53
+ if : runner.os != 'Windows'
54
+ run : |
55
+ # Start the Next.js frontend in background
56
+ npm start &
57
+ FRONTEND_PID=$!
58
+
59
+ # Wait for frontend to start (max 30 seconds)
60
+ timeout=30
61
+ elapsed=0
62
+ started=false
63
+
64
+ while [ $elapsed -lt $timeout ] && [ "$started" = false ]; do
65
+ if curl -s http://localhost:3000 > /dev/null 2>&1; then
66
+ started=true
67
+ echo "✅ Frontend started successfully"
68
+ else
69
+ sleep 1
70
+ elapsed=$((elapsed + 1))
71
+ fi
72
+ done
73
+
74
+ # Clean up background process
75
+ kill $FRONTEND_PID 2>/dev/null || true
76
+
77
+ if [ "$started" = false ]; then
78
+ echo "❌ Frontend failed to start within 30 seconds"
79
+ exit 1
80
+ fi
81
+ shell : bash
82
+
83
+ - name : Test frontend startup (Windows)
84
+ if : runner.os == 'Windows'
85
+ run : |
86
+ # Start the Next.js frontend in background
87
+ npm start &
88
+
89
+ # Wait for frontend to start (max 30 seconds)
90
+ $timeout = 30
91
+ $elapsed = 0
92
+ $started = $false
93
+
94
+ while ($elapsed -lt $timeout -and -not $started) {
95
+ try {
96
+ $response = Invoke-WebRequest -Uri "http://localhost:3000" -TimeoutSec 1 -ErrorAction SilentlyContinue
97
+ if ($response.StatusCode -eq 200) {
98
+ $started = $true
99
+ Write-Host "✅ Frontend started successfully"
100
+ }
101
+ } catch {
102
+ Start-Sleep -Seconds 1
103
+ $elapsed++
104
+ }
105
+ }
106
+
107
+ if (-not $started) {
108
+ Write-Host "❌ Frontend failed to start within 30 seconds"
109
+ exit 1
110
+ }
111
+ shell : pwsh
112
+
113
+ - name : Run linting
114
+ run : npm run lint
115
+
116
+ notify-slack :
117
+ name : Notify Slack on Failure
118
+ runs-on : ubuntu-latest
119
+ needs : smoke
120
+ if : |
121
+ failure() &&
122
+ github.event_name == 'schedule'
123
+ steps :
124
+ - name : Notify Slack
125
+
126
+ with :
127
+ channel-id : ' general'
128
+ payload : |
129
+ {
130
+ "text": ":warning: *Smoke test failed on `with-langgraph-python`* :warning:",
131
+ "blocks": [
132
+ {
133
+ "type": "section",
134
+ "text": {
135
+ "type": "mrkdwn",
136
+ "text": ":warning: *Smoke test failed on `with-langgraph-python`* :warning:\n\n*Repository:* ${{ github.repository }}\n*Workflow:* ${{ github.workflow }}\n*Run ID:* ${{ github.run_id }}\n*Commit:* ${{ github.sha }}\n\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View run details>"
137
+ }
138
+ }
139
+ ]
140
+ }
141
+ env :
142
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
0 commit comments