diff --git a/.github/workflows/docker-dev.yml b/.github/workflows/docker-dev.yml index 4b5d165c..7dc46920 100644 --- a/.github/workflows/docker-dev.yml +++ b/.github/workflows/docker-dev.yml @@ -48,7 +48,7 @@ jobs: load: true - name: Test - timeout-minutes: 3 + timeout-minutes: 2 working-directory: docker/${{ matrix.docker_image }} run: ./test.sh diff --git a/docker/common/start.sh b/docker/common/start.sh index 7e8afbe4..aaff704c 100755 --- a/docker/common/start.sh +++ b/docker/common/start.sh @@ -27,9 +27,16 @@ export BEACON_BACKEND=${BEACON_BACKEND:-mock} OASIS_NODE_SOCKET=${OASIS_NODE_DATADIR}/net-runner/network/client-0/internal.sock OASIS_KM_SOCKET=${OASIS_NODE_DATADIR}/net-runner/network/keymanager-0/internal.sock +OASIS_WEB3_GATEWAY_PID="" +OASIS_NODE_PID="" + function cleanup { - kill -9 $OASIS_WEB3_GATEWAY_PID - kill -9 $OASIS_NODE_PID + if [[ -n "${OASIS_WEB3_GATEWAY_PID}" ]]; then + kill -9 ${OASIS_WEB3_GATEWAY_PID} + fi + if [[ -n "${OASIS_NODE_PID}" ]]; then + kill -9 ${OASIS_NODE_PID} + fi } trap cleanup INT TERM EXIT