From ae08db8ec330208235cf98fea919abd4dd45cf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dragi=C5=A1a=20Spasojevi=C4=87?= Date: Fri, 9 Aug 2024 09:48:39 +0200 Subject: [PATCH 1/4] feat: remove inputs and just use args --- run-nitro-test-node/action.yml | 44 ++++++++++------------------------ 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/run-nitro-test-node/action.yml b/run-nitro-test-node/action.yml index 2b0d5a7..99b133f 100644 --- a/run-nitro-test-node/action.yml +++ b/run-nitro-test-node/action.yml @@ -1,45 +1,29 @@ name: Run Nitro Test Node -description: "Checks out the Nitro repository and runs the local test node setup" +description: 'Checks out the Nitro repository and runs the local test node setup' inputs: - no-token-bridge: - required: false - default: "false" - description: "Whether to skip deploying the token bridge on the test node" - no-l3-token-bridge: - required: false - default: "false" - description: "Whether to skip deploying the L3 token bridge on the test node" - no-simple: - required: false - default: "true" - description: "Whether to start the test node in simple mode" - args: - required: false - default: "" - description: "Additional args that can be supplied to the test node script" nitro-testnode-ref: required: false - default: "release" - description: "The nitro-testnode branch to use" - l3-node: - required: false - default: "false" - description: "Whether to start an L3 node in addition to the L2 node" + default: 'release' + description: 'The nitro-testnode branch to use' nitro-contracts-branch: required: false - description: "The nitro-contracts branch to use" + description: 'The nitro-contracts branch to use' token-bridge-branch: required: false - description: "The token-bridge-contracts branch to use" + description: 'The token-bridge-contracts branch to use' + args: + required: false + default: '' + description: 'Additional args that can be supplied to the test node script' runs: - using: "composite" + using: 'composite' steps: - name: Checkout uses: actions/checkout@v4 with: repository: OffchainLabs/nitro-testnode submodules: true - path: "nitro-testnode" + path: 'nitro-testnode' ref: ${{ inputs.nitro-testnode-ref }} - name: Start background nitro-testnode test-node.bash @@ -57,11 +41,7 @@ runs: 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 }} & + ./test-node.bash --init ${{ inputs.args }} & - name: Wait for nitro startup shell: bash From 49bf5b57afe8dece0f18746ca6463a6f85e62bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dragi=C5=A1a=20Spasojevi=C4=87?= Date: Fri, 9 Aug 2024 10:27:29 +0200 Subject: [PATCH 2/4] fix --- run-nitro-test-node/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/run-nitro-test-node/action.yml b/run-nitro-test-node/action.yml index 99b133f..579a1cd 100644 --- a/run-nitro-test-node/action.yml +++ b/run-nitro-test-node/action.yml @@ -43,21 +43,21 @@ runs: ./test-node.bash --init ${{ inputs.args }} & - - name: Wait for nitro startup + - name: Wait for L2 startup shell: bash run: ${{ github.action_path }}/waitForNitro.sh 8547 - name: Wait for L3 startup - if: ${{ inputs.l3-node == 'true' }} + if: ${{ contains(inputs.args, '--l3node') }} shell: bash run: ${{ github.action_path }}/waitForNitro.sh 3347 - - name: Wait for token bridge deployment - if: ${{ inputs.no-token-bridge != 'true' }} + - name: Wait for L2 token bridge deployment + if: ${{ contains(inputs.args, '--tokenbridge') }} 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' }} + - name: Wait for L3 token bridge deployment + if: ${{ contains(inputs.args, '--l3-token-bridge') }} shell: bash run: ${{ github.action_path }}/waitForTokenBridge.sh l2l3_network.json From 40afd68cb566da1100ab1b4015efcb3f98777eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dragi=C5=A1a=20Spasojevi=C4=87?= Date: Fri, 9 Aug 2024 10:43:15 +0200 Subject: [PATCH 3/4] update text --- run-nitro-test-node/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run-nitro-test-node/action.yml b/run-nitro-test-node/action.yml index 579a1cd..8f699f9 100644 --- a/run-nitro-test-node/action.yml +++ b/run-nitro-test-node/action.yml @@ -1,5 +1,5 @@ -name: Run Nitro Test Node -description: 'Checks out the Nitro repository and runs the local test node setup' +name: Run nitro-testnode +description: 'Checks out the nitro-testnode repository and runs the local testnode' inputs: nitro-testnode-ref: required: false @@ -14,7 +14,7 @@ inputs: args: required: false default: '' - description: 'Additional args that can be supplied to the test node script' + description: 'Additional args that can be supplied to the testnode script' runs: using: 'composite' steps: From 840c2399e01f1398cfeb4fd17cede43affb09054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dragi=C5=A1a=20Spasojevi=C4=87?= Date: Fri, 9 Aug 2024 10:48:46 +0200 Subject: [PATCH 4/4] update --- .github/workflows/run-nitro-test-node.yml | 27 +++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-nitro-test-node.yml b/.github/workflows/run-nitro-test-node.yml index 03bcb1f..d55880a 100644 --- a/.github/workflows/run-nitro-test-node.yml +++ b/.github/workflows/run-nitro-test-node.yml @@ -6,35 +6,44 @@ on: jobs: run-with-defaults: - name: "Run with defaults" + name: 'Run with defaults' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./run-nitro-test-node run-with-token-bridge: - name: "Run without token bridge deployment" + name: 'Run with token bridge deployment' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./run-nitro-test-node with: - no-token-bridge: true + args: --tokenbridge - run-with-args: - name: "Run with args" + run-with-l3: + name: 'Run with L3' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./run-nitro-test-node with: - args: --detach + args: --tokenbridge --l3node - run-with-simple: - name: "Run in simple mode" + run-with-l3-with-token-bridge: + name: 'Run with L3 with token bridge deployment' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./run-nitro-test-node with: - no-simple: false + args: --tokenbridge --l3node --l3-token-bridge + + run-with-no-simple: + name: 'Run with --no-simple mode' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./run-nitro-test-node + with: + args: --no-simple