@@ -281,18 +281,26 @@ func main() {
281281 }
282282 }
283283
284- // Track module change to drive conservative behavior.
284+ // Track module change and CI configuration changes to drive conservative behavior.
285285 moduleChanged := false
286+ ciChanged := false
286287 if * printAllOnChanges {
287288 for _ , f := range files {
288289 if f == "go.mod" || f == "go.sum" {
289290 moduleChanged = true
290- break
291+ }
292+ if strings .HasPrefix (f , "scripts/" ) || strings .HasPrefix (f , ".github/workflows/" ) {
293+ ciChanged = true
291294 }
292295 }
293- if moduleChanged && * mode == "packages" {
296+ if ( moduleChanged || ciChanged ) && * mode == "packages" {
294297 if * verbose {
295- fmt .Fprintln (os .Stderr , "Detected module file change (go.mod/go.sum); selecting all packages ./..." )
298+ if moduleChanged {
299+ fmt .Fprintln (os .Stderr , "Detected module file change (go.mod/go.sum); selecting all packages ./..." )
300+ }
301+ if ciChanged {
302+ fmt .Fprintln (os .Stderr , "Detected CI/detector change (scripts/ or .github/workflows/); selecting all packages ./..." )
303+ }
296304 }
297305 fmt .Println ("./..." )
298306 return
@@ -439,8 +447,8 @@ func main() {
439447 fmt .Fprintf (os .Stderr , " support-bundle: %v\n " , supportHit )
440448 }
441449
442- // If module files changed, conservatively select all tests for both suites.
443- if moduleChanged {
450+ // If module files or CI/detector changed, conservatively select all tests for both suites.
451+ if moduleChanged || ciChanged {
444452 preTests , err := listTestFunctions ("test/e2e/preflight" )
445453 if err != nil {
446454 fmt .Fprintln (os .Stderr , err )
0 commit comments