Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/e2e-phase-5b-hardhat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"playground-cli": patch
---

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.
50 changes: 47 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,49 @@ jobs:
retention-days: 7
if-no-files-found: ignore

test-nightly-publish:
name: "E2E · ${{ matrix.cell }}"
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 55
strategy:
fail-fast: false
max-parallel: 1 # serial — share SIGNER + registry domains
matrix:
include:
- cell: nightly-deploy-hardhat
# source: e2e/cli/deploy.test.ts → describe("dot deploy — hardhat …")
pattern: "deploy — hardhat"
steps:
- uses: actions/checkout@v4

- id: setup
uses: ./.github/actions/setup-e2e

- name: Run E2E cell (one retry on transient testnet failures)
uses: nick-fields/retry@v3
with:
timeout_minutes: 25
max_attempts: 2
retry_wait_seconds: 30
command: pnpm exec vitest run --config e2e/vitest.config.ts ${{ matrix.testFile || '' }} -t "${{ matrix.pattern }}"
env:
TEST_TEMPLATE_DOMAIN: dot-cli-mod-fixture.dot
TEST_TEMPLATE_REPO: https://github.com/paritytech/Rock-Paper-Scissors
DOT_DEPLOY_VERBOSE: "1"
DOT_TAG: ${{ steps.setup.outputs.tag }}
DOT_TELEMETRY: "1"

- name: Upload forensic artefacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: e2e-reports-${{ matrix.cell }}
path: e2e-reports/
retention-days: 7
if-no-files-found: ignore

test-nightly-no-publish:
name: "E2E · ${{ matrix.cell }}"
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand Down Expand Up @@ -176,7 +219,7 @@ jobs:

report:
name: E2E Report
needs: [test-no-publish, test-publish, test-nightly-no-publish]
needs: [test-no-publish, test-publish, test-nightly-no-publish, test-nightly-publish]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
Expand Down Expand Up @@ -218,6 +261,7 @@ jobs:
AGGREGATE_PUBLISH: ${{ needs.test-publish.result }}
AGGREGATE_NO_PUBLISH: ${{ needs.test-no-publish.result }}
AGGREGATE_NIGHTLY_NO_PUBLISH: ${{ needs.test-nightly-no-publish.result }}
AGGREGATE_NIGHTLY_PUBLISH: ${{ needs.test-nightly-publish.result }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
TAG: ${{ needs.test-no-publish.outputs.tag }}
shell: /usr/bin/bash -euo pipefail {0}
Expand All @@ -226,7 +270,7 @@ jobs:
# here when introducing one (Phase 5b+). 'skipped' (a matrix
# that didn't run because of an event-name gate) doesn't
# count as failure.
all_results="$AGGREGATE_PUBLISH $AGGREGATE_NO_PUBLISH $AGGREGATE_NIGHTLY_NO_PUBLISH"
all_results="$AGGREGATE_PUBLISH $AGGREGATE_NO_PUBLISH $AGGREGATE_NIGHTLY_NO_PUBLISH $AGGREGATE_NIGHTLY_PUBLISH"
if echo "$all_results" | grep -q failure; then
AGGREGATE=failure
elif echo "$all_results" | grep -q cancelled; then
Expand Down Expand Up @@ -364,7 +408,7 @@ jobs:
- name: Open failure issue
if: >
(github.event_name == 'schedule' || github.event_name == 'release') &&
(needs.test-no-publish.result != 'success' || needs.test-publish.result != 'success' || needs.test-nightly-no-publish.result != 'success')
(needs.test-no-publish.result != 'success' || needs.test-publish.result != 'success' || needs.test-nightly-no-publish.result != 'success' || needs.test-nightly-publish.result != 'success')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.test-no-publish.outputs.tag }}
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ These are things that aren't self-evident from reading the code and have bitten

- **Local launcher:** `tools/e2e-local.sh [smoke|pr|nightly]` — also callable via `pnpm test:e2e:smoke`, `pnpm test:e2e:pr`, `pnpm test:e2e:nightly`.
- **CI workflow:** `.github/workflows/e2e.yml` — runs on PR / push:main / cron 06:00 UTC / workflow_dispatch.
- **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>"`.
- **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>"`.
- **Test files:** `e2e/cli/*.test.ts` (vitest, spawned via `bun run src/index.ts`).
- **Reports directory:** `e2e-reports/junit.xml` + `e2e-reports/dot-runs.log` (gitignored).
- **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`.
Expand Down
27 changes: 27 additions & 0 deletions e2e/cli/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,33 @@ describe("dot deploy — foundry (requires Paseo + IPFS)", () => {
});
});

describe("dot deploy — hardhat (requires Paseo + IPFS)", () => {
test("hardhat deploy completes end-to-end", { timeout: 450_000 }, async () => {
const domain = E2E_DOMAINS.hardhat;
const result = await dot([
"deploy",
"--signer", "dev",
"--domain", domain,
"--buildDir", absBuildDir(hardhat),
// --no-contract-build skips `npx hardhat compile` (the toolchain
// isn't installed on the CI runner). The fixture ships pre-built
// bytecode under artifacts/contracts/Lock.sol/Lock.json.
"--contracts",
"--no-contract-build",
"--playground",
"--suri", SIGNER.suri,
"--dir", hardhat,
], { timeout: 400_000 });

expect(
result.exitCode,
`hardhat deploy failed: ${result.stdout}\n${result.stderr}`,
).toBe(0);
expect(result.stdout).toContain("Deploy complete");
expect(result.stdout).toContain(domain);
});
});

// SKIPPED: the rust-cdm fixture's `target/flipper.contract` is a stub
// (`{"source":{"hash":"0xabc"}}`) and there is no `target/<crate>.release.polkavm`
// for the skip-build path to read. A working fixture needs:
Expand Down
Loading