File tree Expand file tree Collapse file tree 6 files changed +26
-7
lines changed
packages/compass-smoke-tests/src Expand file tree Collapse file tree 6 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -177,4 +177,5 @@ jobs:
177
177
# Exposing token to prevent update server from being rate limited
178
178
GITHUB_TOKEN : ${{ github.token }}
179
179
working-directory : packages/compass-smoke-tests
180
- run : npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }}
180
+ # Using --skipUninstalling --skipCleanup because the runners are ephemeral
181
+ run : npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }} --skipUninstall --skipCleanup
Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ const argv = yargs(hideBin(process.argv))
96
96
description : 'Do not delete the sandboxes after a run' ,
97
97
default : false ,
98
98
} )
99
+ . option ( 'skipUninstall' , {
100
+ type : 'boolean' ,
101
+ description : 'Do not uninstall after a run' ,
102
+ default : false ,
103
+ } )
99
104
. option ( 'tests' , {
100
105
type : 'array' ,
101
106
string : true ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export type SmokeTestsContext = {
11
11
localPackage ?: boolean ;
12
12
tests : TestName [ ] ;
13
13
skipCleanup : boolean ;
14
+ skipUninstall : boolean ;
14
15
} ;
15
16
16
17
export type SmokeTestsContextWithSandbox = SmokeTestsContext & {
Original file line number Diff line number Diff line change @@ -73,7 +73,11 @@ export async function testAutoUpdateFrom(context: SmokeTestsContext) {
73
73
delete process . env . UPDATE_CHECKER_ALLOW_DOWNGRADES ;
74
74
}
75
75
} finally {
76
- debug ( 'Uninstalling' ) ;
77
- await uninstall ( ) ;
76
+ if ( context . skipUninstall ) {
77
+ debug ( 'Skipped uninstalling' ) ;
78
+ } else {
79
+ debug ( 'Uninstalling' ) ;
80
+ await uninstall ( ) ;
81
+ }
78
82
}
79
83
}
Original file line number Diff line number Diff line change @@ -107,7 +107,11 @@ export async function testAutoUpdateTo(context: SmokeTestsContext) {
107
107
delete process . env . UPDATE_CHECKER_ALLOW_DOWNGRADES ;
108
108
}
109
109
} finally {
110
- debug ( 'Uninstalling' ) ;
111
- await uninstall ( ) ;
110
+ if ( context . skipUninstall ) {
111
+ debug ( 'Skipped uninstalling' ) ;
112
+ } else {
113
+ debug ( 'Uninstalling' ) ;
114
+ await uninstall ( ) ;
115
+ }
112
116
}
113
117
}
Original file line number Diff line number Diff line change @@ -47,7 +47,11 @@ export async function testTimeToFirstQuery(context: SmokeTestsContext) {
47
47
}
48
48
) ;
49
49
} finally {
50
- debug ( 'Uninstalling' ) ;
51
- await uninstall ( ) ;
50
+ if ( context . skipUninstall ) {
51
+ debug ( 'Skipped uninstalling' ) ;
52
+ } else {
53
+ debug ( 'Uninstalling' ) ;
54
+ await uninstall ( ) ;
55
+ }
52
56
}
53
57
}
You can’t perform that action at this time.
0 commit comments