-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into before-fail
- Loading branch information
Showing
6 changed files
with
95 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" # Root directory of the repository | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
rebase-strategy: "auto" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Root directory of the repository | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 5 | ||
rebase-strategy: "auto" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package reporters | ||
|
||
import ( | ||
"fmt" | ||
"path/filepath" | ||
|
||
"github.com/approvals/go-approval-tests/utils" | ||
) | ||
|
||
type systemout struct{} | ||
|
||
// NewQuietReporter creates a new reporter that does nothing. | ||
func NewSystemoutReporter() Reporter { | ||
return &systemout{} | ||
} | ||
|
||
func (s *systemout) Report(approved, received string) bool { | ||
approvedFull, _ := filepath.Abs(approved) | ||
receivedFull, _ := filepath.Abs(received) | ||
|
||
fmt.Printf("approval files did not match\napproved: %v\nreceived: %v\n", approvedFull, receivedFull) | ||
|
||
printFileContent("Received", received) | ||
printFileContent("Approved", approved) | ||
|
||
return true | ||
} | ||
|
||
func printFileContent(label, path string) { | ||
content, err := utils.ReadFile(path) | ||
if err != nil { | ||
content = fmt.Sprintf("** Error reading %s file **", label) | ||
} | ||
fmt.Printf("%s content:\n%s\n", label, content) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters