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-5d-rejections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"playground-cli": patch
---

Nightly E2E now exercises the `--no-contract-build` error path: a new `nightly-rejections` cell asserts the integration-level error message when a Foundry project requests skip-build but ships no pre-built artefacts under `out/`.
3 changes: 3 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ jobs:
# testFile scoping skips globalSetup chain-RPC calls (no chain access needed for diagnostic flag tests).
pattern: "diagnostic mode"
testFile: e2e/cli/diagnostic.test.ts
- cell: nightly-rejections
# source: e2e/cli/deploy.test.ts → describe("dot deploy — rejects --no-contract-build with no artefacts")
pattern: "rejects --no-contract-build"
steps:
# checkout must run before the local composite action can be loaded.
- uses: actions/checkout@v4
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:** 10 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, nightly-deploy-multi). Each cell runs a subset via `vitest -t "<pattern>"`.
- **CI matrix:** 11 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, nightly-rejections) + `test-nightly-publish` (max-parallel: 1, schedule/dispatch only: nightly-deploy-hardhat, nightly-deploy-multi). 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
22 changes: 22 additions & 0 deletions e2e/cli/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,28 @@ runContractDeployTest({ name: "hardhat", domain: E2E_DOMAINS.hardhat, fixture: h
// (TokenA.sol + TokenB.sol deployed in a single --contracts run).
runContractDeployTest({ name: "multi", domain: E2E_DOMAINS.multi, fixture: multiContract });

// Rejection test — does NOT require Paseo or IPFS; exits before any chain mutation.
describe("dot deploy — rejects --no-contract-build with no artefacts", () => {
test("foundry project with --no-contract-build but no out/ → clear error", { timeout: 120_000 }, async () => {
const constructorArgs = fixturePath("constructor-args");
const result = await dot([
"deploy",
"--signer", "dev",
"--domain", E2E_DOMAINS.preflight,
"--buildDir", absBuildDir(constructorArgs),
"--contracts",
"--no-contract-build",
"--playground",
"--suri", SIGNER.suri,
"--dir", constructorArgs,
]);
const output = result.stdout + result.stderr;
expect(result.exitCode).not.toBe(0);
expect(output).toMatch(/no pre-built contract artifacts found/i);
expect(output).toMatch(/--no-contract-build/);
});
});

// 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