diff --git a/Makefile b/Makefile index fb201a9..5ae5097 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,13 @@ forcetest: go clean -testcache HISHTORY_TEST=1 go test -p 1 ./... + test: HISHTORY_TEST=1 go test -p 1 ./... +acttest: + act push -j test + release: expr `cat VERSION` + 1 > VERSION git add VERSION diff --git a/client/client_test.go b/client/client_test.go index 1af01cb..e694bae 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -23,6 +23,11 @@ import ( func TestMain(m *testing.M) { defer shared.RunTestServer()() + cmd := exec.Command("go", "build", "-o", "/tmp/client") + err := cmd.Run() + if err != nil { + panic(fmt.Sprintf("failed to build client: %v", err)) + } m.Run() } @@ -163,8 +168,7 @@ func TestIntegrationWithNewDevice(t *testing.T) { } func installHishtory(t *testing.T, userSecret string) string { - out := RunInteractiveBashCommands(t, `go build -o /tmp/client -/tmp/client install `+userSecret) + out := RunInteractiveBashCommands(t, `/tmp/client install `+userSecret) r := regexp.MustCompile(`Setting secret hishtory key to (.*)`) matches := r.FindStringSubmatch(out) if len(matches) != 2 {