Skip to content

Commit

Permalink
Improve gh-actions output by folding integration-test output
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Nov 10, 2023
1 parent 17f0189 commit c4fbf5e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/integrationtest/arduino-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ func (cli *ArduinoCLI) run(stdoutBuff, stderrBuff io.Writer, stdinBuff io.Reader
if cli.cliConfigPath != nil {
args = append([]string{"--config-file", cli.cliConfigPath.String()}, args...)
}

// Github-actions workflow tags to fold log lines
if os.Getenv("CI") == "github" {
fmt.Printf("::group::Running %s\n", strings.Join(args, " "))
defer fmt.Println("::endgroup::")
}

fmt.Println(color.HiBlackString(">>> Running: ") + color.HiYellowString("%s %s", cli.path, strings.Join(args, " ")))
cliProc, err := executils.NewProcessFromPath(cli.convertEnvForExecutils(env), cli.path, args...)
cli.t.NoError(err)
Expand Down

0 comments on commit c4fbf5e

Please sign in to comment.