Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Smoke

on:
push:
branches: main
pull_request:
branches: main
schedule:
- cron: '0 0 * * *' # Run daily at midnight UTC

jobs:
smoke:
name: ${{ matrix.os }} / Node ${{ matrix.node }} / Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [20, 22]
python: [3.11, 3.12]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install Node.js dependencies (root)
run: npm install

- name: Install Node.js dependencies (agent)
run: |
cd agent
npm install

- name: Install Python dependencies (agent)
run: |
cd agent
pip install -r requirements.txt

- name: Build frontend
run: npm run build

- name: Test frontend startup (Linux/macOS)
if: runner.os != 'Windows'
run: |
# Start the Next.js frontend in background
npm start &
FRONTEND_PID=$!

# Wait for frontend to start (max 30 seconds)
timeout=30
elapsed=0
started=false

while [ $elapsed -lt $timeout ] && [ "$started" = false ]; do
if curl -s http://localhost:3000 > /dev/null 2>&1; then
started=true
echo "✅ Frontend started successfully"
else
sleep 1
elapsed=$((elapsed + 1))
fi
done

# Clean up background process
kill $FRONTEND_PID 2>/dev/null || true

if [ "$started" = false ]; then
echo "❌ Frontend failed to start within 30 seconds"
exit 1
fi
shell: bash

- name: Test frontend startup (Windows)
if: runner.os == 'Windows'
run: |
# Start the Next.js frontend in background
npm start &

# Wait for frontend to start (max 30 seconds)
$timeout = 30
$elapsed = 0
$started = $false

while ($elapsed -lt $timeout -and -not $started) {
try {
$response = Invoke-WebRequest -Uri "http://localhost:3000" -TimeoutSec 1 -ErrorAction SilentlyContinue
if ($response.StatusCode -eq 200) {
$started = $true
Write-Host "✅ Frontend started successfully"
}
} catch {
Start-Sleep -Seconds 1
$elapsed++
}
}

if (-not $started) {
Write-Host "❌ Frontend failed to start within 30 seconds"
exit 1
}
shell: pwsh

- name: Run linting
run: npm run lint

notify-slack:
name: Notify Slack on Failure
runs-on: ubuntu-latest
needs: smoke
if: |
failure() &&
github.event_name == 'schedule'
steps:
- name: Notify Slack
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: 'general'
payload: |
{
"text": ":warning: *Smoke test failed on `with-langgraph-python`* :warning:",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"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>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
33 changes: 0 additions & 33 deletions src/components/tool.tsx

This file was deleted.