Skip to content

Commit e3c5760

Browse files
committed
feat(e2e): consolidate Naga workflows into a single matrix configuration and improve error handling in E2E tests
1 parent ef9ad32 commit e3c5760

File tree

5 files changed

+74
-169
lines changed

5 files changed

+74
-169
lines changed

.github/workflows/e2e-naga-dev.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/e2e-naga-staging.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/e2e-naga-test.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/e2e-naga.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: E2E - Naga (matrix)
2+
3+
on:
4+
push:
5+
branches: [naga, canary-naga]
6+
pull_request:
7+
8+
env:
9+
LOCAL_MASTER_ACCOUNT: ${{ secrets.LOCAL_MASTER_ACCOUNT }}
10+
LOG_LEVEL: debug2
11+
12+
jobs:
13+
e2e:
14+
name: E2E (${{ matrix.network }})
15+
runs-on: ubuntu-latest
16+
environment: ${{ matrix.environment }}
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- environment: naga-dev
23+
network: naga-dev
24+
- environment: naga-staging
25+
network: naga-staging
26+
- environment: naga-test
27+
network: naga-test
28+
29+
env:
30+
# Pulled from the environment-scoped secret of the active matrix environment
31+
LIVE_MASTER_ACCOUNT: ${{ secrets.LIVE_MASTER_ACCOUNT }}
32+
33+
steps:
34+
# ==================== Base Env Setup (shared) ====================
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Install rust
39+
uses: actions-rs/toolchain@v1
40+
with:
41+
toolchain: stable
42+
override: true
43+
components: rust-std
44+
45+
- name: Install wasm-pack
46+
uses: jetli/[email protected]
47+
with:
48+
version: latest
49+
50+
- name: Setup Node
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: 22.18.0
54+
registry-url: https://registry.npmjs.org
55+
cache: pnpm
56+
57+
- name: Setup PNPM
58+
uses: pnpm/action-setup@v4
59+
with:
60+
version: 9.15.0
61+
62+
- name: Install Dependencies
63+
run: pnpm install --frozen-lockfile
64+
65+
# ==================== Run Build (shared) ====================
66+
- name: Build
67+
run: pnpm build
68+
69+
# ==================== Run Tests (varies by matrix) ====================
70+
- name: Run health check (${{ matrix.network }})
71+
run: NETWORK=${{ matrix.network }} pnpm run test:e2e:ci all
72+
timeout-minutes: 10

packages/e2e/src/e2e.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ describe('all', () => {
4343
// alicePkpAuthContext = await createPkpAuthContext(ctx);
4444
eveCustomAuthContext = await createCustomAuthContext(ctx);
4545
} catch (e) {
46+
console.error('❌ Failed to initialise E2E test context');
4647
console.error(e);
47-
process.exit(1);
48+
throw e;
4849
}
4950
});
5051

0 commit comments

Comments
 (0)