// CoreTestOperations is a core set of tests that should be run in most CI cases. These
// steps should generally be quite fast.
CoreTestOperations is a core set of tests that should be run in most CI cases. These
steps should generally be quite fast.
// CoreTestOperations is a core set of tests that should be run in most CI cases . These // steps should generally be quite fast .
func CoreTestOperations(changedFiles ChangedFiles, buildOptions bk.BuildOptions) []Operation {
	operations := []Operation{
		triggerAsync(buildOptions), 
		addLint,                    
		frontendTests,              
		addWebApp,                  
		addBrowserExt,              
		addBrandedTests,            
		addGoTests,                 
		addCheck,                   
		addGoBuild,                 
		addDockerfileLint,          
	}
	if len(changedFiles) == 0 {
		return append(operations, wait)
	}
	switch {
	case changedFiles.onlyDocs():
		operations = []Operation{
			addDocs,
		}
	case changedFiles.onlyGo() && !changedFiles.onlySg():
		operations = []Operation{
			addGoTests, 
			addCheck,   
			addGoBuild, 
		}
	case changedFiles.onlySg():
		operations = []Operation{
			addGoTests,
			addCheck,
		}
	}
	if changedFiles.affectsClient() {
		operations = append(operations, frontendPuppeteerAndStorybook(false))
	}
	return append(operations, wait)
}
func CoreTestOperations ( changedFiles ChangedFiles , buildOptions bk . BuildOptions ) [ ] Operation { operations := [ ] Operation { triggerAsync ( buildOptions ) , addLint , frontendTests , addWebApp , addBrowserExt , addBrandedTests , addGoTests , addCheck , addGoBuild , addDockerfileLint , } if len ( changedFiles ) == 0 { return append ( operations , wait ) } switch { case changedFiles . onlyDocs ( ) : operations = [ ] Operation { addDocs , } case changedFiles . onlyGo ( ) && ! changedFiles . onlySg ( ) : operations = [ ] Operation { addGoTests , addCheck , addGoBuild , } case changedFiles . onlySg ( ) : operations = [ ] Operation { addGoTests , addCheck , } } if changedFiles . affectsClient ( ) { operations = append ( operations , frontendPuppeteerAndStorybook ( false ) ) } return append ( operations , wait ) }
CoreTestOperations is a core set of tests that should be run in most CI cases.
CoreTestOperations is a core set of tests that should be run in most CI cases .
// Default set // triggers a slow pipeline, so do it first. // ~4.5m // ~4.5m // ~3m // ~2m // ~1.5m // ~1.5m // ~1m // ~0.5m // ~0.2m // Special-case branches provide a nil changedFiles to only run default changes. // Build special pipelines for changes that only touch a subset of code. // If this is a docs-only PR, run only the steps necessary to verify the docs. // If this is a go-only PR, run only the steps necessary to verify the go code. // ~1.5m // ~1m // ~0.5m // If the changes are only in ./dev/sg then we only need to run a subset of steps. // Add additional steps // wait for all steps to pass