From ff223eaf087137c843969ea42821ff5f6098a75c Mon Sep 17 00:00:00 2001 From: Diego Ximenes Date: Fri, 21 Jun 2024 15:36:20 -0300 Subject: [PATCH] Runs CI with l3node and no-simple --- .github/workflows/testnode.bash | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testnode.bash b/.github/workflows/testnode.bash index b6d1f596..cb08316d 100755 --- a/.github/workflows/testnode.bash +++ b/.github/workflows/testnode.bash @@ -1,21 +1,31 @@ #!/bin/bash -# The script starts up the test node and waits until the timeout (10min) or +# The script starts up the test node and waits until the timeout (10min) or # until send-l2 succeeds. # Start the test node and get PID, to terminate it once send-l2 is done. cd ${GITHUB_WORKSPACE} # TODO once develop is merged into nitro-contract's master, remove the NITRO_CONTRACTS_BRANCH env var -./test-node.bash --init-force --detach +./test-node.bash --init-force --l3node --no-simple --detach START=$(date +%s) -SUCCEDED=0 +L2_TRANSACTION_SUCCEEDED=false +L3_TRANSACTION_SUCCEEDED=false +SUCCEEDED=false while true; do - if ${GITHUB_WORKSPACE}/test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then - echo "Sending l2 transaction succeeded" - SUCCEDED=1 - break + if [ "$L2_TRANSACTION_SUCCEEDED" = false ]; then + if ${GITHUB_WORKSPACE}/test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then + echo "Sending l2 transaction succeeded" + L2_TRANSACTION_SUCCEEDED=true + fi + fi + + if [ "$L3_TRANSACTION_SUCCEEDED" = false ]; then + if ${GITHUB_WORKSPACE}/test-node.bash script send-l3 --ethamount 100 --to user_l3user --wait; then + echo "Sending l3 transaction succeeded" + L3_TRANSACTION_SUCCEEDED=true + fi fi # Check if the timeout (10 min) has been reached. @@ -31,7 +41,7 @@ done docker-compose stop -if [ "$SUCCEDED" -eq 0 ]; then +if [ "$L2_TRANSACTION_SUCCEEDED" = false ] || [ "$L3_TRANSACTION_SUCCEEDED" = false ]; then docker-compose logs exit 1 fi