Skip to content

SDK Test

SDK Test #56

Workflow file for this run

name: SDK Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
# Run at the first day of each month to detect external breakage
- cron: '0 0 1 * *'
jobs:
test:
name: Test datastar-cl SDK
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Roswell
uses: 40ants/setup-lisp@v2
with:
asdf-system: datastar-cl
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libev-dev golang-go
- name: Start test servers in background
run: |
nohup qlot exec ros -s datastar-cl-tests -e '(datastar-cl-tests::start-all-servers)' -e '(loop (sleep 1))' > /tmp/lisp.log 2>&1 &
echo $! > /tmp/lisp.pid
echo "Started Lisp servers with PID $(cat /tmp/lisp.pid)"
sleep 3
echo "Checking if process is still running..."
if ps -p $(cat /tmp/lisp.pid) > /dev/null; then
echo "✓ Process is running"
else
echo "✗ Process died immediately. Log output:"
cat /tmp/lisp.log || echo "No log file"
exit 1
fi
- name: Wait for all servers to be ready
run: |
echo "Waiting for test servers on ports 48331, 48332, 48333..."
for port in 48331 48332 48333; do
echo "Checking port $port..."
for i in {1..30}; do
if curl -f -s http://localhost:$port/ > /dev/null 2>&1; then
echo "✓ Port $port is ready"
break
fi
if [ $i -eq 30 ]; then
echo "✗ Port $port failed to start after 60 seconds"
exit 1
fi
echo " Waiting for port $port... ($i/30)"
sleep 2
done
done
echo "All servers are ready!"
- name: Run SDK compliance tests
run: |
chmod +x tests/run-sdk-tests.sh
tests/run-sdk-tests.sh
- name: Run SSE macro tests
run: |
chmod +x tests/run-sse-tests.sh
tests/run-sse-tests.sh
- name: Cleanup
if: always()
run: |
if [ -f /tmp/lisp.pid ]; then
echo "Stopping Lisp (PID $(cat /tmp/lisp.pid))..."
kill $(cat /tmp/lisp.pid) || true
rm /tmp/lisp.pid
fi
if [ -f /tmp/lisp.log ]; then
echo "Lisp process log:"
cat /tmp/lisp.log
fi