From 9c253cbdda60cea0f1f54bec557e4f1fd1ac2e15 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Sun, 4 Dec 2022 02:00:12 +0100 Subject: [PATCH] Fix cond --- go/localtests/test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/localtests/test.go b/go/localtests/test.go index c31800d..9f2e144 100644 --- a/go/localtests/test.go +++ b/go/localtests/test.go @@ -130,7 +130,9 @@ func (test *Test) Migrate(config Config, primary, replica *sql.DB) (err error) { cmd.Stderr = &stderr 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) { scanner := bufio.NewScanner(&output) fmt.Printf("::group::%s stdout\n", test.Name)