@@ -122,6 +122,8 @@ jobs:
122122 FOUNDRY_PROFILE : " ci"
123123 RPC_URL_HYPERLIQUID : " http://127.0.0.1:8546"
124124 RPC_URL_HYPERLIQUID_UPSTREAM : ${{ secrets.RPC_URL_HYPERLIQUID_UPSTREAM || 'https://rpc.hyperliquid.xyz/evm' }}
125+ # Exclude e2e tests from regular CI
126+ JEST_TEST_PATH_IGNORE_PATTERNS : ' ["<rootDir>/**/test/e2e/**"]'
125127
126128 # We'll collect the docker compose logs from all containers on failure
127129 - name : Collect docker logs on failure
@@ -137,23 +139,122 @@ jobs:
137139 with :
138140 path : ./logs
139141
140- test-user :
141- name : User test
142- runs-on : ${{ matrix.runner }}
142+ test-e2e :
143+ name : Test E2E (Non-blocking)
144+ runs-on : ubuntu-latest-16xlarge
145+ if : github.ref != 'refs/heads/main'
143146
144147 permissions :
145148 contents : read
146149 packages : read
150+ issues : write
151+ pull-requests : write
147152
148- strategy :
149- matrix :
150- include :
151- - platform : linux/amd64
152- runner : ubuntu-latest-16xlarge
153- arch : amd64
154- - platform : linux/arm64
155- runner : ubuntu-latest-16xlarge-arm
156- arch : arm64
153+ steps :
154+ - name : Checkout repo
155+ uses : actions/checkout@v4
156+ with :
157+ submodules : " true"
158+
159+ - name : Setup environment
160+ uses : ./.github/workflows/actions/setup-environment
161+
162+ - name : Setup build cache
163+ uses : ./.github/workflows/actions/setup-build-cache
164+
165+ - name : E2E Test Notice
166+ run : |
167+ echo "::notice::🧪 E2E tests are non-blocking and run against live networks"
168+ echo "::notice::These tests validate real blockchain interactions but may fail due to:"
169+ echo "::notice:: - Network connectivity issues"
170+ echo "::notice:: - RPC rate limiting"
171+ echo "::notice:: - External service downtime"
172+ echo "::notice:: - Gas price fluctuations"
173+ echo "::notice::E2E test failures do NOT block the main CI pipeline"
174+
175+ # There is a small bug in docker compose that will cause 401 if we don't pull the base image manually
176+ #
177+ # See more here https://github.com/docker/compose-cli/issues/1545
178+ - name : Authenticate to GHCR
179+ run : echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
180+
181+ - name : Test E2E
182+ id : test-e2e
183+ run : pnpm test:ci:e2e
184+ continue-on-error : true
185+ env :
186+ # Disable parallel execution for now
187+ LZ_ENABLE_EXPERIMENTAL_PARALLEL_EXECUTION : false
188+ JEST_TIMEOUT : 120_000 # Increase timeout for ARM builds (2 minutes)
189+ TEST_TIMEOUT : 1_200_000 # 20 minutes timeout for long-running e2e tests
190+ # We'll use the prebuilt base image
191+ DEVTOOLS_BASE_IMAGE : ghcr.io/layerzero-labs/devtools-dev-base:main
192+ # And the prebuilt hardhat EVM node image
193+ DEVTOOLS_EVM_NODE_IMAGE : ghcr.io/layerzero-labs/devtools-dev-node-evm-hardhat:main
194+ # And the prebuilt TON node image
195+ DEVTOOLS_TON_NODE_IMAGE : ghcr.io/layerzero-labs/devtools-dev-node-ton-my-local-ton:main
196+ # Enable Solana tests for e2e
197+ LZ_DEVTOOLS_ENABLE_SOLANA_TESTS : 1
198+ RPC_URL_SOLANA_MAINNET : ${{ secrets.RPC_URL_SOLANA_MAINNET || 'https://rpc.ankr.com/solana' }}
199+ RPC_URL_SOLANA_TESTNET : ${{ secrets.RPC_URL_SOLANA_TESTNET || 'https://api.devnet.solana.com' }}
200+ FOUNDRY_PROFILE : " ci"
201+ RPC_URL_HYPERLIQUID : " http://127.0.0.1:8546"
202+ RPC_URL_HYPERLIQUID_UPSTREAM : ${{ secrets.RPC_URL_HYPERLIQUID_UPSTREAM || 'https://rpc.hyperliquid.xyz/evm' }}
203+ # Run only e2e tests
204+ JEST_TEST_PATH_PATTERN : ' test/e2e'
205+
206+ # We'll collect the docker compose logs from all containers on failure
207+ - name : Collect docker logs on failure
208+ if : steps.test-e2e.outcome == 'failure'
209+ uses : jwalton/gh-docker-logs@v2
210+ with :
211+ dest : " ./logs"
212+
213+ # We'll collect the docker compose logs from all containers on failure
214+ - name : Store docker logs
215+ if : steps.test-e2e.outcome == 'failure'
216+ uses : actions/upload-artifact@v4
217+ with :
218+ path : ./logs
219+
220+ # Post comment on E2E test failure
221+ - name : Comment on E2E failure
222+ if : steps.test-e2e.outcome == 'failure'
223+ uses : actions/github-script@v7
224+ with :
225+ script : |
226+ const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
227+ const prNumber = context.payload.pull_request?.number;
228+
229+ if (prNumber) {
230+ const comment = "## 🚨 E2E Tests Failed\n\n" +
231+ "The E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:\n" +
232+ "- Network connectivity issues\n" +
233+ "- RPC rate limiting\n" +
234+ "- External service downtime\n" +
235+ "**Action Run:** " + runUrl + "\n\n" +
236+ "This is **non-blocking** and does not prevent merging. Check the action logs above for detailed failure information.";
237+
238+ try {
239+ await github.rest.issues.createComment({
240+ issue_number: prNumber,
241+ owner: context.repo.owner,
242+ repo: context.repo.repo,
243+ body: comment
244+ });
245+ } catch (error) {
246+ // Silently fail if we don't have permission to comment (e.g., on forks)
247+ console.log('Could not post comment to PR:', error.message);
248+ }
249+ }
250+
251+ test-user :
252+ name : User test (Parallel)
253+ runs-on : ubuntu-latest-16xlarge
254+
255+ permissions :
256+ contents : read
257+ packages : read
157258 steps :
158259 - name : Checkout repo
159260 uses : actions/checkout@v4
0 commit comments