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
3 changes: 2 additions & 1 deletion .github/workflows/test-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions packages/compass-smoke-tests/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/compass-smoke-tests/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type SmokeTestsContext = {
localPackage?: boolean;
tests: TestName[];
skipCleanup: boolean;
skipUninstall: boolean;
};

export type SmokeTestsContextWithSandbox = SmokeTestsContext & {
Expand Down
8 changes: 6 additions & 2 deletions packages/compass-smoke-tests/src/tests/auto-update-from.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
8 changes: 6 additions & 2 deletions packages/compass-smoke-tests/src/tests/auto-update-to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
Loading