Skip to content

Commit be97503

Browse files
committed
e2e(cat21-wallet): build extension from source instead of release download
The SDK bootstrap script's release-download path expects a `cat21wallet-extension-v6.103.0.675` release on `ordpool-space/ordpool-sdk` with a `.crx` attached. That release doesn't exist yet — cat21-wallet's own `cat21:trusted-build` workflow is the canonical publisher and hasn't produced a release on `ordpool-space/cat21-wallet` either. Pivot: use the bootstrap script's `CAT21_WALLET_LOCAL_DIST` override path. The workflow now checks out cat21-wallet's public repo, builds the extension with pnpm, and points the bootstrap at the resulting `apps/extension/dist/`. The bootstrap copies it into `sdk/e2e/extensions/cat21wallet/` and skips the download path entirely. Two caches keep this affordable on subsequent runs: - pnpm store keyed by pnpm-lock.yaml hash - extension dist keyed by source file hashes First run pays the ~5-10 min build cost; cache hits skip back to near-zero.
1 parent e2e0f8c commit be97503

1 file changed

Lines changed: 42 additions & 6 deletions

File tree

.github/workflows/e2e-regtest-mint-cat21wallet.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,53 @@ jobs:
112112
working-directory: sdk
113113
run: npx playwright install --with-deps chromium
114114

115-
- name: Cache unpacked Cat21 Wallet extension
116-
id: cat21wallet-cache
115+
# Cat21 Wallet doesn't ship a published .crx yet — its
116+
# `cat21:trusted-build` workflow is the canonical publisher but
117+
# hasn't produced a release on the `ordpool-space/cat21-wallet`
118+
# repo. So we build the extension from source in CI. cat21-wallet
119+
# is a public repo; checkout works without auth.
120+
- name: Checkout cat21-wallet (extension source)
121+
uses: actions/checkout@v4
122+
with:
123+
repository: ordpool-space/cat21-wallet
124+
path: cat21-wallet-src
125+
ref: dev
126+
127+
- name: Setup pnpm for cat21-wallet build
128+
uses: pnpm/action-setup@v4
129+
with:
130+
version: 10
131+
run_install: false
132+
133+
- name: Cache cat21-wallet pnpm store
117134
uses: actions/cache@v4
118135
with:
119-
path: sdk/e2e/extensions/cat21wallet
120-
key: cat21wallet-extension-v6.103.0.675
136+
path: ~/.local/share/pnpm/store
137+
key: cat21wallet-pnpm-${{ hashFiles('cat21-wallet-src/pnpm-lock.yaml') }}
138+
restore-keys: |
139+
cat21wallet-pnpm-
140+
141+
- name: Cache cat21-wallet extension dist
142+
id: cat21wallet-dist-cache
143+
uses: actions/cache@v4
144+
with:
145+
path: cat21-wallet-src/apps/extension/dist
146+
key: cat21wallet-dist-${{ hashFiles('cat21-wallet-src/pnpm-lock.yaml', 'cat21-wallet-src/apps/extension/**/*.ts', 'cat21-wallet-src/apps/extension/**/*.tsx', 'cat21-wallet-src/packages/**/*.ts') }}
147+
148+
- name: Install cat21-wallet dependencies
149+
if: steps.cat21wallet-dist-cache.outputs.cache-hit != 'true'
150+
working-directory: cat21-wallet-src
151+
run: pnpm install --frozen-lockfile
152+
153+
- name: Build cat21-wallet extension
154+
if: steps.cat21wallet-dist-cache.outputs.cache-hit != 'true'
155+
working-directory: cat21-wallet-src
156+
run: pnpm build:extension
121157

122-
- name: Download + unpack Cat21 Wallet from SDK release mirror
123-
if: steps.cat21wallet-cache.outputs.cache-hit != 'true'
158+
- name: Stage cat21-wallet extension via SDK bootstrap (LOCAL_DIST mode)
124159
env:
125160
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
CAT21_WALLET_LOCAL_DIST: ${{ github.workspace }}/cat21-wallet-src/apps/extension/dist
126162
working-directory: sdk
127163
run: bash e2e/playwright/playwright-bootstrap.sh cat21wallet
128164

0 commit comments

Comments
 (0)