Skip to content

Commit 7314f49

Browse files
authored
Merge pull request #140 from OffchainLabs/add-ci-for-custom-gas-token-chains
Add CI for custom gas token chains
2 parents 1dcf270 + 5cdaf34 commit 7314f49

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

.github/workflows/test-all.yml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ env:
1515
TransferTo: '0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E'
1616

1717
jobs:
18-
test-all:
19-
name: Test all tutorials
18+
test-all-eth:
19+
name: Test all tutorials (ETH-based chain)
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
@@ -32,8 +32,43 @@ jobs:
3232
nitro-testnode-ref: release
3333
args: --tokenbridge --l3node --l3-token-bridge
3434

35-
- name: Copy .env
36-
run: cp ./.env-sample ./.env
35+
- name: Test
36+
run: yarn run testAll
37+
38+
test-all-custom-gas:
39+
name: Test all tutorials (Custom-gas-token chain)
40+
runs-on: ubuntu-latest
41+
env:
42+
# We need to use the account that has the native token (the L3 rollup owner)
43+
PRIVATE_KEY: 'ecdf21cb41c65afb51f91df408b7656e2c8739a5877f2814add0afd780cc210e'
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- name: Restore node_modules
49+
uses: OffchainLabs/actions/node-modules/install@main
50+
51+
- name: Set up the local node
52+
# https://github.com/OffchainLabs/actions/blob/feat-simplify/run-nitro-test-node/action.yml
53+
uses: OffchainLabs/actions/run-nitro-test-node@feat-simplify
54+
with:
55+
nitro-testnode-ref: release
56+
args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token
57+
58+
- name: Modify custom network file
59+
# Some contract addresses are different when using a custom gas token chain
60+
run: >
61+
jq -c '
62+
.[1].nativeToken = "0xE069078bA9ACCE4eeAE609d8754515Cf13dd6706" |
63+
.[1].ethBridge.rollup = "0x44612A67F6A7c4C894fB4AeA66c7Cfa7A0f0D388" |
64+
.[1].tokenBridge.parentGatewayRouter = "0x0C085152C2799834fc1603533ff6916fa1FdA302" |
65+
.[1].tokenBridge.parentErc20Gateway = "0x59156b0596689D965Ba707E160e5370AF22461a0" |
66+
.[1].tokenBridge.parentCustomGateway = "0xCe02eA568090ae7d5184B0a98df90f6aa69C1552" |
67+
.[1].tokenBridge.parentWethGateway = "0x0000000000000000000000000000000000000000" |
68+
.[1].tokenBridge.childWethGateway = "0x0000000000000000000000000000000000000000" |
69+
.[1].tokenBridge.parentWeth = "0x0000000000000000000000000000000000000000" |
70+
.[1].tokenBridge.childWeth = "0x0000000000000000000000000000000000000000"
71+
' customNetwork.json > tmp.customNetwork.json && mv tmp.customNetwork.json customNetwork.json
3772
3873
- name: Test
3974
run: yarn run testAll

0 commit comments

Comments
 (0)