Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Oct 6, 2024
1 parent 5dcef24 commit 4bc6c0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
"release:check": "changeset status --verbose --since=origin/main",
"release:publish": "pnpm install && pnpm build && changeset publish",
"release:version": "changeset version && pnpm install --lockfile-only && pnpm run changelog:generate",
"pretest": "ANVIL_PORT=8556 tsx test-setup/startAnvil.ts & wait-on tcp:8556",
"test": "pnpm run --recursive test",
"pretest:ci": "pnpm run pretest",
"test:ci": "pnpm run --recursive test:ci",
"test": "pnpm run test:start-anvil & wait-on tcp:8556 && pnpm run --recursive test",
"test:ci": "pnpm run test:start-anvil & wait-on tcp:8556 && pnpm run --recursive test:ci",
"test:start-anvil": "tsx test-setup/startAnvil.ts",
"type-bench": "pnpm --filter ./test/ts-benchmarks bench",
"type-stats-repo": "attest stats packages/*",
"vercel:prepare": "(forge --version || pnpm foundryup) && ln -sf /vercel/.foundry/bin/* node_modules/.bin/ && forge --version"
Expand Down
4 changes: 2 additions & 2 deletions test-setup/common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createTestClient, http } from "viem";

export const anvilHost = process.env.ANVIL_HOST ?? "127.0.0.1";
export const anvilPort = process.env.ANVIL_PORT ?? "8556";
export const anvilHost = process.env.ANVIL_HOST || "127.0.0.1";
export const anvilPort = Number(process.env.ANVIL_PORT) || 8556;

// ID of the current test worker. Used by the `@viem/anvil` proxy server.
export const poolId = Number(process.env.VITEST_POOL_ID ?? 1);
Expand Down
5 changes: 1 addition & 4 deletions test-setup/startAnvil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ await execa("pnpm", ["run", "build"], {
});

console.log("starting anvil proxy");
await startAnvilProxy({
host: anvilHost,
port: Number(anvilPort),
});
await startAnvilProxy({ host: anvilHost, port: anvilPort });

// ensure anvil dies
process.on("SIGINT", () => process.exit());
Expand Down

0 comments on commit 4bc6c0d

Please sign in to comment.