From 28b10092c35c43520beb5a4df4ebb18e7e67ef78 Mon Sep 17 00:00:00 2001 From: spsjvc Date: Tue, 25 Mar 2025 11:39:14 +0100 Subject: [PATCH 1/2] feat(testnode): improve support for args --- run-nitro-test-node/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/run-nitro-test-node/action.yml b/run-nitro-test-node/action.yml index 2b0d5a7..9abbee7 100644 --- a/run-nitro-test-node/action.yml +++ b/run-nitro-test-node/action.yml @@ -57,7 +57,8 @@ runs: export TOKEN_BRIDGE_BRANCH="${{ inputs.token-bridge-branch }}" fi - ./test-node.bash --init ${{ inputs.no-simple == 'true' && '--no-simple' || '' }} \ + ./test-node.bash --init \ + ${{ inputs.no-simple == 'true' && '--no-simple' || '' }} \ ${{ inputs.l3-node == 'true' && '--l3node' || '' }} \ ${{ inputs.no-token-bridge == 'true' && '--no-tokenbridge' || '--tokenbridge' }} \ ${{ inputs.l3-node == 'true' && inputs.no-l3-token-bridge != 'true' && '--l3-token-bridge' || '' }} \ @@ -68,16 +69,16 @@ runs: run: ${{ github.action_path }}/waitForNitro.sh 8547 - name: Wait for L3 startup - if: ${{ inputs.l3-node == 'true' }} + if: ${{ contains(inputs.args, '--l3node') || inputs.l3-node == 'true' }} shell: bash run: ${{ github.action_path }}/waitForNitro.sh 3347 - name: Wait for token bridge deployment - if: ${{ inputs.no-token-bridge != 'true' }} + if: ${{ contains(inputs.args, '--tokenbridge') || inputs.no-token-bridge != 'true' }} shell: bash run: ${{ github.action_path }}/waitForTokenBridge.sh localNetwork.json - name: Wait for token bridge deployment - if: ${{ inputs.l3-node == 'true' && inputs.no-l3-token-bridge != 'true' }} + if: ${{ contains(inputs.args, '--l3-token-bridge') || (inputs.l3-node == 'true' && inputs.no-l3-token-bridge != 'true') }} shell: bash run: ${{ github.action_path }}/waitForTokenBridge.sh l2l3_network.json From 7c41aa439bd4b7430c9e8562becc01075381050e Mon Sep 17 00:00:00 2001 From: spsjvc Date: Tue, 25 Mar 2025 12:12:27 +0100 Subject: [PATCH 2/2] override args --- run-nitro-test-node/action.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/run-nitro-test-node/action.yml b/run-nitro-test-node/action.yml index 9abbee7..273a476 100644 --- a/run-nitro-test-node/action.yml +++ b/run-nitro-test-node/action.yml @@ -53,16 +53,20 @@ runs: if [ -n "${{ inputs.nitro-contracts-branch }}" ]; then export NITRO_CONTRACTS_BRANCH="${{ inputs.nitro-contracts-branch }}" fi + if [ -n "${{ inputs.token-bridge-branch }}" ]; then export TOKEN_BRIDGE_BRANCH="${{ inputs.token-bridge-branch }}" fi - ./test-node.bash --init \ - ${{ inputs.no-simple == 'true' && '--no-simple' || '' }} \ - ${{ inputs.l3-node == 'true' && '--l3node' || '' }} \ - ${{ inputs.no-token-bridge == 'true' && '--no-tokenbridge' || '--tokenbridge' }} \ - ${{ inputs.l3-node == 'true' && inputs.no-l3-token-bridge != 'true' && '--l3-token-bridge' || '' }} \ - ${{ inputs.args }} & + if [ -n "${{ inputs.args }}" ]; then + ./test-node.bash --init ${{ inputs.args }} & + else + ./test-node.bash --init \ + ${{ inputs.no-simple == 'true' && '--no-simple' || '' }} \ + ${{ inputs.l3-node == 'true' && '--l3node' || '' }} \ + ${{ inputs.no-token-bridge == 'true' && '--no-tokenbridge' || '--tokenbridge' }} \ + ${{ inputs.l3-node == 'true' && inputs.no-l3-token-bridge != 'true' && '--l3-token-bridge' || '' }} & + fi - name: Wait for nitro startup shell: bash