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 diff --git a/run-nitro-test-node/action.yml b/run-nitro-test-node/action.yml index 2b0d5a7..8f699f9 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" +name: Run nitro-testnode +description: 'Checks out the nitro-testnode repository and runs the local testnode' 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 testnode 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,27 +41,23 @@ 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 + - 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