build: Add more GitHub Actions

This commit is contained in:
Jakob Borg
2023-02-22 10:56:55 +01:00
parent 17887ce0b1
commit 8991ecf444
6 changed files with 323 additions and 53 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
package meta
import (
"fmt"
"os"
"os/exec"
"path/filepath"
@@ -32,7 +33,7 @@ func TestCheckGoFmt(t *testing.T) {
cmd := exec.Command("gofmt", "-s", "-d", path)
bs, err := cmd.CombinedOutput()
if err != nil {
return err
return fmt.Errorf("%w: %s", err, string(bs))
}
if len(bs) != 0 {
t.Errorf("File %s is not formatted correctly:\n\n%s", path, string(bs))