From 9b5282fbc1879b9c68eebdf09271cc254cc4efc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D1=85=D0=B5=D1=80=D0=B5=D1=82=D0=B8=D0=BA?= <херетик@indra.org> Date: Fri, 2 Jun 2023 10:40:48 +0100 Subject: [PATCH] updating to make CI filter for tests --- .github/workflows/tests.yml | 2 +- cmd/bumper/main.go | 3 +++ pkg/engine/fail_test.go | 2 +- pkg/onions/headers/sendgetbalance_test.go | 2 +- pkg/onions/hiddenservice/hiddenservice_test.go | 2 +- version.go | 17 ++++++++++++----- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 978575f5..9ab40d6e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,4 +22,4 @@ jobs: go-version: 1.19 - name: Test - run: go test -v ./pkg/... + run: go test -v -tags failingtests ./pkg/... diff --git a/cmd/bumper/main.go b/cmd/bumper/main.go index 99664cf7..7c27def3 100644 --- a/cmd/bumper/main.go +++ b/cmd/bumper/main.go @@ -223,6 +223,8 @@ const ( Patch = %d ) +var CI = %s + // Version returns a pretty printed version information string. func Version() string { return fmt.Sprint( @@ -246,6 +248,7 @@ func Version() string { Major, Minor, Patch, + "false", ) path := filepath.Join(PathBase, "version.go") if e = os.WriteFile(path, []byte(versionFileOut), 0666); check(e) { diff --git a/pkg/engine/fail_test.go b/pkg/engine/fail_test.go index 65be6227..8cfc530c 100644 --- a/pkg/engine/fail_test.go +++ b/pkg/engine/fail_test.go @@ -1,4 +1,4 @@ -//go:build failingtests +//go:build !failingtests package engine diff --git a/pkg/onions/headers/sendgetbalance_test.go b/pkg/onions/headers/sendgetbalance_test.go index d507c75b..32e09140 100644 --- a/pkg/onions/headers/sendgetbalance_test.go +++ b/pkg/onions/headers/sendgetbalance_test.go @@ -1,4 +1,4 @@ -//go:build failingtests +//go:build !failingtests package headers diff --git a/pkg/onions/hiddenservice/hiddenservice_test.go b/pkg/onions/hiddenservice/hiddenservice_test.go index 5b77c080..a9cde30d 100644 --- a/pkg/onions/hiddenservice/hiddenservice_test.go +++ b/pkg/onions/hiddenservice/hiddenservice_test.go @@ -1,4 +1,4 @@ -//go:build failingtests +//go:build !failingtests package hiddenservice diff --git a/version.go b/version.go index a972583f..191f6bae 100644 --- a/version.go +++ b/version.go @@ -1,6 +1,7 @@ //go:build !local -// This can be overridden by a developer's version by setting the tag local. +// This can be overridden by a developer's version by setting the tag local +// on a modified version. This is useful for the code locations in teh logs. package indra @@ -14,19 +15,23 @@ import "fmt" // which will run all these generators below and finish with a go install. //go:generate go install ./... +import ( + "fmt" +) + const ( // URL is the git URL for the repository. URL = "github.com/indra-labs/indra" // GitRef is the gitref, as in refs/heads/branchname. - GitRef = "refs/heads/master" + GitRef = "refs/heads/protocol" // ParentGitCommit is the commit hash of the parent HEAD. - ParentGitCommit = "654916462d717f2f521c3234d1044a3128140b90" + ParentGitCommit = "c67bd0ea723f4af6571e49b56291ac1d8cdc6eae" // BuildTime stores the time when the current binary was built. - BuildTime = "2023-05-18T12:39:10+01:00" + BuildTime = "2023-06-02T10:40:48+01:00" // SemVer lists the (latest) git tag on the release. SemVer = "v0.1.12" // PathBase is the path base returned from runtime caller. - PathBase = "/opt/indra-labs/indra/" + PathBase = "/home/loki/indra-labs/indra/" // Major is the major number from the tag. Major = 0 // Minor is the minor number from the tag. @@ -35,6 +40,8 @@ const ( Patch = 12 ) +var CI = false + // Version returns a pretty printed version information string. func Version() string { return fmt.Sprint(