diff --git a/.github/workflows/bridge-ci.yml b/.github/workflows/bridge-ci.yml index df8caef59..89655a5ec 100644 --- a/.github/workflows/bridge-ci.yml +++ b/.github/workflows/bridge-ci.yml @@ -88,6 +88,11 @@ jobs: - name: Stop required services run: docker compose -f "bridge/testing-docker-compose.yml" down + - name: Idle Test + working-directory: bridge + run: ./run-idle-test.sh + + # deny-check: # name: cargo-deny check # runs-on: ubuntu-24.04 diff --git a/bridge/run-idle-test.sh b/bridge/run-idle-test.sh new file mode 100755 index 000000000..c4daf71c1 --- /dev/null +++ b/bridge/run-idle-test.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +cargo build + +# We've seen some segfauls from deno that require the interpreter running +# for a period. The test here is to watch the bridge process and make sure +# it is still alive after some time has passed. +RUST_LOG="notset" target/debug/svix-bridge --cfg '{}' & +SVIX_BRIDGE_PID=$! +echo "Monitoring PID=$SVIX_BRIDGE_PID" +sleep 15 +ps $SVIX_BRIDGE_PID > /dev/null +if [ "$?" -ne 0 ]; then + echo "fail: process terminated prematurely" + exit 1 +fi +echo "success: process stayed up" +kill $SVIX_BRIDGE_PID