File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,25 @@ const allTests = glob
82
82
. sync ( testGlob , { nodir : true , cwd : e2eRoot , ignore : argv . ignore } )
83
83
// Replace windows slashes.
84
84
. map ( ( name ) => name . replace ( / \\ / g, '/' ) )
85
- . sort ( )
86
- . filter ( ( name ) => ! name . endsWith ( '/setup.ts' ) ) ;
85
+ . filter ( ( name ) => {
86
+ if ( name . endsWith ( '/setup.ts' ) ) {
87
+ return false ;
88
+ }
89
+
90
+ // The below is to exclude specific tests that are not intented to run for the current package manager.
91
+ // This is also important as without the trickery the tests that take the longest ex: update.ts (2.5mins)
92
+ // will be executed on the same shard.
93
+ const fileName = path . basename ( name ) ;
94
+ if (
95
+ ( fileName . startsWith ( 'yarn-' ) && ! argv . yarn ) ||
96
+ ( fileName . startsWith ( 'npm-' ) && argv . yarn )
97
+ ) {
98
+ return false ;
99
+ }
100
+
101
+ return true ;
102
+ } )
103
+ . sort ( ) ;
87
104
88
105
const shardId = 'shard' in argv ? argv [ 'shard' ] : null ;
89
106
const nbShards = ( shardId === null ? 1 : argv [ 'nb-shards' ] ) || 2 ;
You can’t perform that action at this time.
0 commit comments