@@ -222,3 +222,121 @@ jobs:
222222 INTEGRATION_TEST_DECIMALS=${{matrix.config.decimals}} \
223223 INTEGRATION_TEST_NITRO_CONTRACTS_BRANCH=${{matrix.config.nitro-contracts-branch}} \
224224 pnpm test:integration
225+
226+ test-integration-arbitrum-testnode :
227+ name : Test (Integration) - Arbitrum Testnode - ${{ matrix.config.name }}
228+ runs-on : ubuntu-latest
229+ permissions :
230+ contents : read
231+ packages : read
232+ strategy :
233+ matrix :
234+ config :
235+ - name : Nitro contracts v3.2 - Custom gas token with 18 decimals
236+ image : ghcr.io/offchainlabs/arbitrum-testnode-ci:v0.2.10-nc3.2-l3-custom-18
237+ variant : l3-custom-18
238+ container : arbitrum-testnode-v3-2-l3-custom-18
239+ nitro-contracts-version : v3.2
240+ decimals : 18
241+
242+ - name : Nitro contracts v3.2 - Custom gas token with 6 decimals
243+ image : ghcr.io/offchainlabs/arbitrum-testnode-ci:v0.2.10-nc3.2-l3-custom-6
244+ variant : l3-custom-6
245+ container : arbitrum-testnode-v3-2-l3-custom-6
246+ nitro-contracts-version : v3.2
247+ decimals : 6
248+
249+ - name : Nitro contracts v2.1 - Custom gas token with 18 decimals
250+ image : ghcr.io/offchainlabs/arbitrum-testnode-ci:v0.2.10-nc2.1-l3-custom-18
251+ variant : l3-custom-18
252+ container : arbitrum-testnode-v2-1-l3-custom-18
253+ nitro-contracts-version : v2.1
254+ decimals : 18
255+
256+ - name : Nitro contracts v2.1 - Custom gas token with 6 decimals
257+ image : ghcr.io/offchainlabs/arbitrum-testnode-ci:v0.2.10-nc2.1-l3-custom-6
258+ variant : l3-custom-6
259+ container : arbitrum-testnode-v2-1-l3-custom-6
260+ nitro-contracts-version : v2.1
261+ decimals : 6
262+
263+ steps :
264+ - name : Checkout
265+ uses : actions/checkout@v4
266+
267+ - name : Setup pnpm
268+ uses : pnpm/action-setup@v4
269+ with :
270+ version : 10.30.3
271+ run_install : false
272+
273+ - name : Setup Node.js
274+ uses : actions/setup-node@v4
275+ with :
276+ node-version-file : .nvmrc
277+
278+ - name : Install node_modules
279+ uses : OffchainLabs/actions/node-modules/install@main
280+ with :
281+ install-command : pnpm install --frozen-lockfile
282+ cache-key : ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
283+
284+ - name : Login to GitHub Container Registry
285+ uses : docker/login-action@v3
286+ with :
287+ registry : ghcr.io
288+ username : ${{ github.actor }}
289+ password : ${{ secrets.GITHUB_TOKEN }}
290+
291+ - name : Set up Docker Buildx
292+ uses : docker/setup-buildx-action@v3
293+
294+ - name : Build token bridge contracts image
295+ uses : docker/build-push-action@v6
296+ with :
297+ context : token-bridge-contracts
298+ load : true
299+ tags : arbitrum-chain-sdk-token-bridge-contracts:v1.2.2
300+ cache-from : type=gha,scope=token-bridge-contracts-v1.2.2
301+ cache-to : type=gha,mode=max,scope=token-bridge-contracts-v1.2.2
302+
303+ - name : Set up the local node
304+ run : |
305+ docker pull "${{ matrix.config.image }}"
306+ docker run -d \
307+ --name "${{ matrix.config.container }}" \
308+ --platform linux/amd64 \
309+ -e TESTNODE_VARIANT="${{ matrix.config.variant }}" \
310+ -p 127.0.0.1:8545:8545 \
311+ -p 127.0.0.1:8547:8547 \
312+ -p 127.0.0.1:8548:8548 \
313+ -p 127.0.0.1:3347:8549 \
314+ -p 127.0.0.1:3348:8550 \
315+ -p 127.0.0.1:8080:8080 \
316+ "${{ matrix.config.image }}"
317+
318+ deadline=$((SECONDS + 120))
319+ until curl -sf http://127.0.0.1:8080/health >/dev/null; do
320+ if (( SECONDS >= deadline )); then
321+ docker logs "${{ matrix.config.container }}" >&2 || true
322+ echo "arbitrum-testnode did not become healthy within 120s" >&2
323+ exit 1
324+ fi
325+ sleep 1
326+ done
327+
328+ - name : Copy .env
329+ run : cp ./.env.example ./.env
330+
331+ - name : Build
332+ run : pnpm build
333+
334+ - name : Test
335+ run : |
336+ ARBITRUM_TESTNODE_CONTAINER=${{ matrix.config.container }} \
337+ INTEGRATION_TEST_DECIMALS=${{ matrix.config.decimals }} \
338+ INTEGRATION_TEST_NITRO_CONTRACTS_BRANCH=${{ matrix.config.nitro-contracts-version }} \
339+ NITRO_TESTNODE_L3_TOKEN_BRIDGE_DEPLOYER_PRIVATE_KEY=0x84f89f9afcf4cd87bbf0a8872a1abd8ddf69364da61a2c2a5286d999383cd2c9 \
340+ TOKEN_BRIDGE_CONTRACTS_SKIP_BUILD=true \
341+ CI=true \
342+ pnpm test:integration
0 commit comments