This commit is contained in:
Tim Vaillancourt 2022-12-04 02:00:12 +01:00
parent 94c27becc9
commit 9c253cbdda

View File

@ -130,7 +130,9 @@ func (test *Test) Migrate(config Config, primary, replica *sql.DB) (err error) {
cmd.Stderr = &stderr cmd.Stderr = &stderr
cmd.Stdout = &output cmd.Stdout = &output
if strings.TrimSpace(os.Getenv("GITHUB_ACTION")) == "true" { // group stdout log lines if running in GitHub Actions
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
if strings.TrimSpace(os.Getenv("GITHUB_ACTION")) != "" {
go func(reader io.Reader) { go func(reader io.Reader) {
scanner := bufio.NewScanner(&output) scanner := bufio.NewScanner(&output)
fmt.Printf("::group::%s stdout\n", test.Name) fmt.Printf("::group::%s stdout\n", test.Name)