Skip to content

Commit e5b1b19

Browse files
ci(e2e): nightly-deploy-hardhat cell (Phase 5b) (#89)
- New test-nightly-publish matrix (max-parallel: 1, schedule/dispatch only) - New nightly-deploy-hardhat cell: full EVM deploy with --no-contract-build - Fix hardhat fixture: move Lock.json from artifacts/Lock.sol/ (standard Hardhat layout) to artifacts/contracts/Lock.sol/ (@parity/hardhat-polkadot plugin layout that contracts.ts reads in skip-build mode) - Report job extended to fan-in test-nightly-publish - CLAUDE.md: 9 cells across four matrices
1 parent b1d694b commit e5b1b19

5 files changed

Lines changed: 80 additions & 4 deletions

File tree

.changeset/e2e-phase-5b-hardhat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"playground-cli": patch
3+
---
4+
5+
Nightly E2E now exercises the Hardhat (EVM) full-deploy path: a new `nightly-deploy-hardhat` cell publishes the hardhat fixture's pre-built `Lock.sol` bytecode to the `e2e-cli-hardhat.dot` domain on Paseo. Runs on schedule/dispatch only (max-parallel: 1 with `pr-deploy-frontend`/`pr-deploy-foundry` since they share SIGNER), so per-PR runtime is unaffected.

.github/workflows/e2e.yml

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,49 @@ jobs:
125125
retention-days: 7
126126
if-no-files-found: ignore
127127

128+
test-nightly-publish:
129+
name: "E2E · ${{ matrix.cell }}"
130+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
131+
runs-on: ubuntu-latest
132+
timeout-minutes: 55
133+
strategy:
134+
fail-fast: false
135+
max-parallel: 1 # serial — share SIGNER + registry domains
136+
matrix:
137+
include:
138+
- cell: nightly-deploy-hardhat
139+
# source: e2e/cli/deploy.test.ts → describe("dot deploy — hardhat …")
140+
pattern: "deploy — hardhat"
141+
steps:
142+
- uses: actions/checkout@v4
143+
144+
- id: setup
145+
uses: ./.github/actions/setup-e2e
146+
147+
- name: Run E2E cell (one retry on transient testnet failures)
148+
uses: nick-fields/retry@v3
149+
with:
150+
timeout_minutes: 25
151+
max_attempts: 2
152+
retry_wait_seconds: 30
153+
command: pnpm exec vitest run --config e2e/vitest.config.ts ${{ matrix.testFile || '' }} -t "${{ matrix.pattern }}"
154+
env:
155+
TEST_TEMPLATE_DOMAIN: dot-cli-mod-fixture.dot
156+
TEST_TEMPLATE_REPO: https://github.com/paritytech/Rock-Paper-Scissors
157+
DOT_DEPLOY_VERBOSE: "1"
158+
DOT_TAG: ${{ steps.setup.outputs.tag }}
159+
DOT_TELEMETRY: "1"
160+
161+
- name: Upload forensic artefacts
162+
if: always()
163+
continue-on-error: true
164+
uses: actions/upload-artifact@v4
165+
with:
166+
name: e2e-reports-${{ matrix.cell }}
167+
path: e2e-reports/
168+
retention-days: 7
169+
if-no-files-found: ignore
170+
128171
test-nightly-no-publish:
129172
name: "E2E · ${{ matrix.cell }}"
130173
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
@@ -176,7 +219,7 @@ jobs:
176219

177220
report:
178221
name: E2E Report
179-
needs: [test-no-publish, test-publish, test-nightly-no-publish]
222+
needs: [test-no-publish, test-publish, test-nightly-no-publish, test-nightly-publish]
180223
if: always()
181224
runs-on: ubuntu-latest
182225
timeout-minutes: 5
@@ -218,6 +261,7 @@ jobs:
218261
AGGREGATE_PUBLISH: ${{ needs.test-publish.result }}
219262
AGGREGATE_NO_PUBLISH: ${{ needs.test-no-publish.result }}
220263
AGGREGATE_NIGHTLY_NO_PUBLISH: ${{ needs.test-nightly-no-publish.result }}
264+
AGGREGATE_NIGHTLY_PUBLISH: ${{ needs.test-nightly-publish.result }}
221265
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
222266
TAG: ${{ needs.test-no-publish.outputs.tag }}
223267
shell: /usr/bin/bash -euo pipefail {0}
@@ -226,7 +270,7 @@ jobs:
226270
# here when introducing one (Phase 5b+). 'skipped' (a matrix
227271
# that didn't run because of an event-name gate) doesn't
228272
# count as failure.
229-
all_results="$AGGREGATE_PUBLISH $AGGREGATE_NO_PUBLISH $AGGREGATE_NIGHTLY_NO_PUBLISH"
273+
all_results="$AGGREGATE_PUBLISH $AGGREGATE_NO_PUBLISH $AGGREGATE_NIGHTLY_NO_PUBLISH $AGGREGATE_NIGHTLY_PUBLISH"
230274
if echo "$all_results" | grep -q failure; then
231275
AGGREGATE=failure
232276
elif echo "$all_results" | grep -q cancelled; then
@@ -364,7 +408,7 @@ jobs:
364408
- name: Open failure issue
365409
if: >
366410
(github.event_name == 'schedule' || github.event_name == 'release') &&
367-
(needs.test-no-publish.result != 'success' || needs.test-publish.result != 'success' || needs.test-nightly-no-publish.result != 'success')
411+
(needs.test-no-publish.result != 'success' || needs.test-publish.result != 'success' || needs.test-nightly-no-publish.result != 'success' || needs.test-nightly-publish.result != 'success')
368412
env:
369413
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
370414
TAG: ${{ needs.test-no-publish.outputs.tag }}

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These are things that aren't self-evident from reading the code and have bitten
5656

5757
- **Local launcher:** `tools/e2e-local.sh [smoke|pr|nightly]` — also callable via `pnpm test:e2e:smoke`, `pnpm test:e2e:pr`, `pnpm test:e2e:nightly`.
5858
- **CI workflow:** `.github/workflows/e2e.yml` — runs on PR / push:main / cron 06:00 UTC / workflow_dispatch.
59-
- **CI matrix:** 8 cells across three matrices — `test-no-publish` (parallel: pr-install, pr-preflight, pr-mod, pr-init-session) + `test-publish` (max-parallel: 1: pr-deploy-frontend, pr-deploy-foundry) + `test-nightly-no-publish` (parallel, schedule/dispatch only: nightly-mod-miss, nightly-diagnostic). Each cell runs a subset via `vitest -t "<pattern>"`.
59+
- **CI matrix:** 9 cells across four matrices — `test-no-publish` (parallel: pr-install, pr-preflight, pr-mod, pr-init-session) + `test-publish` (max-parallel: 1: pr-deploy-frontend, pr-deploy-foundry) + `test-nightly-no-publish` (parallel, schedule/dispatch only: nightly-mod-miss, nightly-diagnostic) + `test-nightly-publish` (max-parallel: 1, schedule/dispatch only: nightly-deploy-hardhat). Each cell runs a subset via `vitest -t "<pattern>"`.
6060
- **Test files:** `e2e/cli/*.test.ts` (vitest, spawned via `bun run src/index.ts`).
6161
- **Reports directory:** `e2e-reports/junit.xml` + `e2e-reports/dot-runs.log` (gitignored).
6262
- **Tag prefix:** `DOT_TAG=e2e-{ci|local}-{trigger}` so Sentry dashboards filter test traffic. The CLI plumbs `DOT_TAG` into the `cli.tag` root-span attribute via `src/telemetry-config.ts`.

e2e/cli/deploy.test.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,33 @@ describe("dot deploy — foundry (requires Paseo + IPFS)", () => {
267267
});
268268
});
269269

270+
describe("dot deploy — hardhat (requires Paseo + IPFS)", () => {
271+
test("hardhat deploy completes end-to-end", { timeout: 450_000 }, async () => {
272+
const domain = E2E_DOMAINS.hardhat;
273+
const result = await dot([
274+
"deploy",
275+
"--signer", "dev",
276+
"--domain", domain,
277+
"--buildDir", absBuildDir(hardhat),
278+
// --no-contract-build skips `npx hardhat compile` (the toolchain
279+
// isn't installed on the CI runner). The fixture ships pre-built
280+
// bytecode under artifacts/contracts/Lock.sol/Lock.json.
281+
"--contracts",
282+
"--no-contract-build",
283+
"--playground",
284+
"--suri", SIGNER.suri,
285+
"--dir", hardhat,
286+
], { timeout: 400_000 });
287+
288+
expect(
289+
result.exitCode,
290+
`hardhat deploy failed: ${result.stdout}\n${result.stderr}`,
291+
).toBe(0);
292+
expect(result.stdout).toContain("Deploy complete");
293+
expect(result.stdout).toContain(domain);
294+
});
295+
});
296+
270297
// SKIPPED: the rust-cdm fixture's `target/flipper.contract` is a stub
271298
// (`{"source":{"hash":"0xabc"}}`) and there is no `target/<crate>.release.polkavm`
272299
// for the skip-build path to read. A working fixture needs:

e2e/cli/fixtures/projects/hardhat/artifacts/Lock.sol/Lock.json renamed to e2e/cli/fixtures/projects/hardhat/artifacts/contracts/Lock.sol/Lock.json

File renamed without changes.

0 commit comments

Comments
 (0)