Skip to content

Commit 70ea4d0

Browse files
fix: stabilize integration docker test flow in CI
1 parent a07573f commit 70ea4d0

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

Dockerfile.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ WORKDIR /code
88

99
COPY ["package.json", "pnpm-lock.yaml", "./"]
1010

11-
RUN corepack enable && corepack prepare pnpm@$PNPM_VERSION --activate && pnpm install --frozen-lockfile --silent
11+
RUN corepack enable && corepack prepare pnpm@$PNPM_VERSION --activate && pnpm install --frozen-lockfile --silent --ignore-scripts
1212

1313
CMD ["true"]
14-

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"test:load": "node -r ts-node/register ./scripts/security-load-test.ts",
7777
"smoke:nip03": "node -r ts-node/register scripts/smoke-nip03.ts",
7878
"test:integration": "cucumber-js",
79-
"cover:integration": "nyc --report-dir .coverage/integration pnpm run test:integration -p cover",
79+
"cover:integration": "nyc --report-dir .coverage/integration npm run test:integration -- -p cover",
8080
"export": "node --env-file-if-exists=.env -r ts-node/register src/scripts/export-events.ts",
8181
"docker:compose:start": "pnpm run cli -- start",
8282
"docker:compose:stop": "pnpm run cli -- stop",
@@ -89,8 +89,8 @@
8989
"i2p:docker:compose:stop": "pnpm run cli -- stop",
9090
"docker:integration:run": "docker compose -f ./test/integration/docker-compose.yml run --rm tests",
9191
"test:cli:docker-smoke": "pnpm run cli -- stop --all && pnpm run cli -- info",
92-
"docker:test:integration": "pnpm run docker:integration:run pnpm run test:integration",
93-
"docker:cover:integration": "pnpm run docker:integration:run pnpm exec nyc --report-dir .coverage/integration pnpm run test:integration -- -p cover",
92+
"docker:test:integration": "pnpm run docker:integration:run npm run test:integration",
93+
"docker:cover:integration": "pnpm run docker:integration:run npm run cover:integration",
9494
"postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down",
9595
"prepack": "pnpm run build",
9696
"prepare": "node .husky/install.mjs",

test/integration/features/compression/compression-roundtrip.feature.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Given('a seeded compression roundtrip dataset', async function (this: World<Reco
148148

149149
When(
150150
'I export events using {string} compression',
151+
{ timeout: 20000 },
151152
async function (this: World<Record<string, unknown>>, format: string) {
152153
if (format !== 'gzip' && format !== 'xz') {
153154
throw new Error(`Unsupported test format: ${format}`)
@@ -183,17 +184,21 @@ When('I remove the seeded roundtrip events from the database', async function (t
183184
.delete()
184185
})
185186

186-
When('I import the compressed roundtrip file', async function (this: World<Record<string, unknown>>) {
187-
const state = getRoundtripState(this)
187+
When(
188+
'I import the compressed roundtrip file',
189+
{ timeout: 20000 },
190+
async function (this: World<Record<string, unknown>>) {
191+
const state = getRoundtripState(this)
188192

189-
const result = await runCliScript('src/import-events.ts', [
190-
state.outputFilePath,
191-
'--batch-size',
192-
'2',
193-
])
193+
const result = await runCliScript('src/import-events.ts', [
194+
state.outputFilePath,
195+
'--batch-size',
196+
'2',
197+
])
194198

195-
assertCommandSuccess(result, 'import script')
196-
})
199+
assertCommandSuccess(result, 'import script')
200+
},
201+
)
197202

198203
Then('the seeded roundtrip events are restored', async function (this: World<Record<string, unknown>>) {
199204
const state = getRoundtripState(this)
@@ -226,4 +231,4 @@ After({ tags: '@compression-roundtrip' }, async function (this: World<Record<str
226231
}
227232

228233
this.parameters[ROUNDTRIP_KEY] = undefined
229-
})
234+
})

0 commit comments

Comments
 (0)