Skip to content

Commit b58a736

Browse files
committed
feat(e2e): restructure E2E workflow to include build job and optimize artifact handling
1 parent ffc66f8 commit b58a736

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

.github/workflows/e2e-naga.yml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,39 @@ on:
66
pull_request:
77

88
jobs:
9+
build:
10+
name: Build once
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions-rs/toolchain@v1
15+
with:
16+
toolchain: stable
17+
override: true
18+
components: rust-std
19+
- uses: jetli/[email protected]
20+
with:
21+
version: latest
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22.18.0
25+
registry-url: https://registry.npmjs.org
26+
- name: Enable corepack + pin pnpm
27+
run: |
28+
corepack enable
29+
corepack prepare [email protected] --activate
30+
- run: pnpm install --frozen-lockfile
31+
- run: pnpm build
32+
- name: Upload build output
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: build-output
36+
path: dist
37+
if-no-files-found: error
38+
939
e2e:
1040
name: E2E (${{ matrix.network }})
41+
needs: build
1142
runs-on: ubuntu-latest
1243
strategy:
1344
fail-fast: false
@@ -22,49 +53,17 @@ jobs:
2253
- environment: naga-test
2354
network: naga-test
2455
privateKey: LIVE_MASTER_ACCOUNT_NAGA_TEST
25-
2656
env:
2757
LOCAL_MASTER_ACCOUNT: ${{ secrets.LOCAL_MASTER_ACCOUNT }}
2858
LOG_LEVEL: debug2
29-
# Dynamic lookup of the right secret by matrix entry
3059
LIVE_MASTER_ACCOUNT: ${{ secrets[matrix.privateKey] }}
31-
3260
steps:
33-
# ==================== Base Env Setup (shared) ====================
34-
- name: Checkout
35-
uses: actions/checkout@v4
36-
37-
- name: Install rust
38-
uses: actions-rs/toolchain@v1
39-
with:
40-
toolchain: stable
41-
override: true
42-
components: rust-std
43-
44-
- name: Install wasm-pack
45-
uses: jetli/[email protected]
61+
- uses: actions/checkout@v4
62+
- name: Download build output
63+
uses: actions/download-artifact@v4
4664
with:
47-
version: latest
48-
49-
- name: Setup Node
50-
uses: actions/setup-node@v4
51-
with:
52-
node-version: 22.18.0
53-
registry-url: https://registry.npmjs.org
54-
55-
- name: Enable corepack + pin pnpm
56-
run: |
57-
corepack enable
58-
corepack prepare [email protected] --activate
59-
60-
- name: Install Dependencies
61-
run: pnpm install --frozen-lockfile
62-
63-
# ==================== Run Build (shared) ====================
64-
- name: Build
65-
run: pnpm build
66-
67-
# ==================== Run Tests (varies by matrix) ====================
65+
name: build-output
66+
path: dist
6867
- name: Run health check (${{ matrix.network }})
6968
run: NETWORK=${{ matrix.network }} pnpm run test:e2e:ci all
7069
timeout-minutes: 10

0 commit comments

Comments
 (0)