diff --git a/.github/workflows/test-installers.yml b/.github/workflows/test-installers.yml index 8229aaafb1a..bd836e76f88 100644 --- a/.github/workflows/test-installers.yml +++ b/.github/workflows/test-installers.yml @@ -177,4 +177,5 @@ jobs: # Exposing token to prevent update server from being rate limited GITHUB_TOKEN: ${{ github.token }} working-directory: packages/compass-smoke-tests - run: npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }} + # Using --skipUninstalling --skipCleanup because the runners are ephemeral + run: npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }} --skipUninstall --skipCleanup diff --git a/packages/compass-smoke-tests/src/cli.ts b/packages/compass-smoke-tests/src/cli.ts index 02a80808981..2ff69ce5bf9 100755 --- a/packages/compass-smoke-tests/src/cli.ts +++ b/packages/compass-smoke-tests/src/cli.ts @@ -96,6 +96,11 @@ const argv = yargs(hideBin(process.argv)) description: 'Do not delete the sandboxes after a run', default: false, }) + .option('skipUninstall', { + type: 'boolean', + description: 'Do not uninstall after a run', + default: false, + }) .option('tests', { type: 'array', string: true, diff --git a/packages/compass-smoke-tests/src/context.ts b/packages/compass-smoke-tests/src/context.ts index 0f46d634583..3b75f610dd5 100644 --- a/packages/compass-smoke-tests/src/context.ts +++ b/packages/compass-smoke-tests/src/context.ts @@ -11,6 +11,7 @@ export type SmokeTestsContext = { localPackage?: boolean; tests: TestName[]; skipCleanup: boolean; + skipUninstall: boolean; }; export type SmokeTestsContextWithSandbox = SmokeTestsContext & { diff --git a/packages/compass-smoke-tests/src/tests/auto-update-from.ts b/packages/compass-smoke-tests/src/tests/auto-update-from.ts index e58420dd744..c9daa165a84 100644 --- a/packages/compass-smoke-tests/src/tests/auto-update-from.ts +++ b/packages/compass-smoke-tests/src/tests/auto-update-from.ts @@ -73,7 +73,11 @@ export async function testAutoUpdateFrom(context: SmokeTestsContext) { delete process.env.UPDATE_CHECKER_ALLOW_DOWNGRADES; } } finally { - debug('Uninstalling'); - await uninstall(); + if (context.skipUninstall) { + debug('Skipped uninstalling'); + } else { + debug('Uninstalling'); + await uninstall(); + } } } diff --git a/packages/compass-smoke-tests/src/tests/auto-update-to.ts b/packages/compass-smoke-tests/src/tests/auto-update-to.ts index bedfb378ba5..9f406260047 100644 --- a/packages/compass-smoke-tests/src/tests/auto-update-to.ts +++ b/packages/compass-smoke-tests/src/tests/auto-update-to.ts @@ -107,7 +107,11 @@ export async function testAutoUpdateTo(context: SmokeTestsContext) { delete process.env.UPDATE_CHECKER_ALLOW_DOWNGRADES; } } finally { - debug('Uninstalling'); - await uninstall(); + if (context.skipUninstall) { + debug('Skipped uninstalling'); + } else { + debug('Uninstalling'); + await uninstall(); + } } } diff --git a/packages/compass-smoke-tests/src/tests/time-to-first-query.ts b/packages/compass-smoke-tests/src/tests/time-to-first-query.ts index 72d555c0f82..6bde37df10f 100644 --- a/packages/compass-smoke-tests/src/tests/time-to-first-query.ts +++ b/packages/compass-smoke-tests/src/tests/time-to-first-query.ts @@ -47,7 +47,11 @@ export async function testTimeToFirstQuery(context: SmokeTestsContext) { } ); } finally { - debug('Uninstalling'); - await uninstall(); + if (context.skipUninstall) { + debug('Skipped uninstalling'); + } else { + debug('Uninstalling'); + await uninstall(); + } } }