Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9f26b90
feat: devnet integration testing in ci
shrugs Mar 5, 2026
9dd74a0
fix: ensv1 test
shrugs Mar 5, 2026
6e9f56b
fix: address PR review feedback for integration test CI
shrugs Mar 5, 2026
348ac48
Merge branch 'main' into feat/esn-test-env-integration-test
shrugs Mar 5, 2026
13705e2
chore: tighten integration test healthcheck timeouts
shrugs Mar 5, 2026
7c6dd9b
fix: detect signal-killed child processes in integration test CI
shrugs Mar 5, 2026
6da5f46
fix: handle spawn errors in integration test CI
shrugs Mar 5, 2026
a789f5b
refactor: use typed constants and parallelize container startup
shrugs Mar 5, 2026
fa35c1a
fix: wait for child processes to exit before stopping containers
shrugs Mar 5, 2026
1959aeb
fix: stop child processes in reverse order during cleanup
shrugs Mar 5, 2026
44fccbf
fix: run integration from the monorepo root to get silence behavior
shrugs Mar 5, 2026
6ec0ddb
refactor: move integration test env to @ensnode/integration-test-env …
shrugs Mar 5, 2026
0c7cdfd
fix: ensure containers are stopped by calling process.exit after cleanup
shrugs Mar 5, 2026
2d9d790
fix: disable testcontainers ryuk since we handle cleanup ourselves
shrugs Mar 5, 2026
cecc6bb
fix: handle Ctrl-C cleanup correctly
shrugs Mar 5, 2026
72082b8
fix: top-level integration:ci script
shrugs Mar 5, 2026
83cd2ff
fix
shrugs Mar 5, 2026
38da140
fix: clear waitForExit timeout on normal exit, add fetch timeout
shrugs Mar 5, 2026
d5a9727
refactor: use execa for subprocess management
shrugs Mar 5, 2026
65cccdd
docs: add frontmatter to integration test orchestrator
shrugs Mar 5, 2026
5fa8bf0
clean up
shrugs Mar 5, 2026
42b11b0
fix: set cleanupInProgress in cleanup() to suppress spurious abort er…
shrugs Mar 6, 2026
907f9c2
fix: kill entire process group during cleanup
shrugs Mar 6, 2026
ef33e40
updates
shrugs Mar 6, 2026
da7068d
fix: bot notes
shrugs Mar 6, 2026
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
13 changes: 13 additions & 0 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: "Test: CI"

permissions:
contents: read

on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -99,3 +102,13 @@ jobs:
# healthcheck script env variables
HEALTH_CHECK_TIMEOUT: 60
run: ./.github/scripts/run_ensindexer_healthcheck.sh

integration-tests:
name: "Integration Tests"
runs-on: blacksmith-4vcpu-ubuntu-2204
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_node_environment
- name: Run integration tests
run: pnpm test:integration:ci
17 changes: 9 additions & 8 deletions apps/ensapi/src/graphql-api/schema/query.integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Address, labelhash } from "viem";
import { type Address, labelhash, namehash } from "viem";
import { describe, expect, it } from "vitest";

import { DatasourceNames } from "@ensnode/datasources";
Expand All @@ -8,6 +8,7 @@ import {
getDatasourceContract,
getENSv2RootRegistryId,
type InterpretedLabel,
makeENSv1DomainId,
makeENSv2DomainId,
type Name,
} from "@ensnode/ensnode-sdk";
Expand All @@ -34,6 +35,8 @@ const V2_ROOT_REGISTRY = getDatasourceContract(
"RootRegistry",
);

const V1_ETH_DOMAIN_ID = makeENSv1DomainId(namehash("eth"));

const V2_ETH_CANONICAL_ID = getCanonicalId(labelhash("eth"));
const V2_ETH_DOMAIN_ID = makeENSv2DomainId(V2_ROOT_REGISTRY, V2_ETH_CANONICAL_ID);

Expand Down Expand Up @@ -95,13 +98,11 @@ describe("Query.domains", () => {
const v1EthDomain = domains.find((d) => d.__typename === "ENSv1Domain" && d.name === "eth");
const v2EthDomain = domains.find((d) => d.__typename === "ENSv2Domain" && d.name === "eth");

// TODO: the v1 eth label should surely exist but i don't see it in devnet at the moment?
expect(v1EthDomain).toBeUndefined();
// expect(v1EthDomain).toMatchObject({
// id: V1_ETH_DOMAIN_ID,
// name: "eth",
// label: { interpreted: "eth" },
// });
expect(v1EthDomain).toMatchObject({
id: V1_ETH_DOMAIN_ID,
name: "eth",
label: { interpreted: "eth" },
});

expect(v2EthDomain).toMatchObject({
id: V2_ETH_DOMAIN_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { GraphQLClient } from "graphql-request";

export { gql } from "graphql-request";

export const ENSAPI_GRAPHQL_API_URL =
process.env.ENSAPI_GRAPHQL_API_URL ?? "http://localhost:4334/api/graphql";
export const ENSNODE_GRAPHQL_API_URL = new URL(
"/api/graphql",
process.env.ENSNODE_URL || "http://localhost:4334",
).href;

export const client = new GraphQLClient(ENSAPI_GRAPHQL_API_URL);
export const client = new GraphQLClient(ENSNODE_GRAPHQL_API_URL);
4 changes: 2 additions & 2 deletions apps/ensapi/src/test/integration/global-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { client, ENSAPI_GRAPHQL_API_URL, gql } from "./ensnode-graphql-api-client";
import { client, ENSNODE_GRAPHQL_API_URL, gql } from "./ensnode-graphql-api-client";

export async function setup() {
try {
Expand All @@ -13,7 +13,7 @@ export async function setup() {
`);
} catch (error) {
throw new Error(
`Integration test health check failed: could not reach ${ENSAPI_GRAPHQL_API_URL}. ` +
`Integration test health check failed: could not reach ${ENSNODE_GRAPHQL_API_URL}. ` +
`Ensure ensapi is running before running integration tests.\n` +
`Original error: ${error}`,
);
Expand Down
Empty file modified apps/ensrainbow/scripts/download-prebuilt-database.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"lint:ci": "biome ci",
"test": "vitest --silent passed-only",
"test:integration": "vitest --config vitest.integration.config.ts --silent passed-only",
"test:integration:ci": "pnpm -F @ensnode/integration-test-env start",
"typecheck": "pnpm -r --parallel --aggregate-output typecheck",
"changeset": "changeset",
"changeset:next": "changeset version --snapshot next",
Expand Down
18 changes: 18 additions & 0 deletions packages/integration-test-env/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@ensnode/integration-test-env",
"version": "0.0.0",
"private": true,
"type": "module",
"description": "Integration test environment orchestration for ENSNode",
"scripts": {
"start": "CI=1 tsx src/ci.ts"
},
"dependencies": {
"@ensnode/datasources": "workspace:*",
"@ensnode/ensnode-sdk": "workspace:*",
"@testcontainers/postgresql": "^11.12.0",
"execa": "^9.6.1",
"testcontainers": "^11.12.0",
"tsx": "^4.7.1"
}
}
Loading