File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,12 @@ const specialPaths = {
82
82
'packages/firestore' : [ 'firebase-firestore-integration-test' ]
83
83
} ;
84
84
85
+ /**
86
+ * firebase and firebase-exp don't have tests and are very expensive to build, so we don't
87
+ * generate TestTasks for them.
88
+ */
89
+ const ignoredPackages = [ 'firebase' , 'firebase-exp' ] ;
90
+
85
91
/**
86
92
* Identify modified packages that require tests.
87
93
*/
@@ -97,7 +103,7 @@ export async function getTestTasks(): Promise<TestTask[]> {
97
103
) ;
98
104
const diff = await git . diff ( [ '--name-only' , 'origin/master...HEAD' ] ) ;
99
105
const changedFiles = diff . split ( '\n' ) ;
100
- const testTasks : TestTask [ ] = [ ] ;
106
+ let testTasks : TestTask [ ] = [ ] ;
101
107
for ( const filename of changedFiles ) {
102
108
// Files that trigger full test suite.
103
109
if ( fullTestTriggerFiles . includes ( filename ) ) {
@@ -156,12 +162,16 @@ export async function getTestTasks(): Promise<TestTask[]> {
156
162
}
157
163
}
158
164
}
165
+
159
166
if ( testTasks . length === 0 ) {
160
167
console . log (
161
168
chalk `{green No changes detected in any package. No test tasks is created }`
162
169
) ;
163
170
}
164
171
172
+ // remove ignored packages
173
+ testTasks = testTasks . filter ( t => ! ignoredPackages . includes ( t . pkgName ) ) ;
174
+
165
175
return testTasks ;
166
176
}
167
177
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { getTestTasks , runTests } from './run_changed' ;
19
+ import { buildForTests } from './build' ;
19
20
20
21
const includeOnlyPackages = [ 'firebase-messaging-integration-test' ] ;
21
22
22
23
async function run ( ) {
23
24
let testTasks = await getTestTasks ( ) ;
24
25
testTasks = testTasks . filter ( t => includeOnlyPackages . includes ( t . pkgName ) ) ;
25
-
26
+ await buildForTests ( testTasks ) ;
26
27
runTests ( testTasks ) ;
27
28
}
28
29
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { getTestTasks , runTests } from './run_changed' ;
19
+ import { buildForTests } from './build' ;
19
20
20
21
const includeOnlyPackages = [
21
22
'@firebase/firestore' ,
@@ -25,7 +26,7 @@ const includeOnlyPackages = [
25
26
async function run ( ) {
26
27
let testTasks = await getTestTasks ( ) ;
27
28
testTasks = testTasks . filter ( t => includeOnlyPackages . includes ( t . pkgName ) ) ;
28
-
29
+ await buildForTests ( testTasks ) ;
29
30
runTests ( testTasks ) ;
30
31
}
31
32
You can’t perform that action at this time.
0 commit comments