From 550e76cdba2b8a0df590db5a6381939e8c880dbd Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 11:31:04 +0200 Subject: [PATCH 1/8] fix broken pipe code coverage Signed-off-by: Enrique Lacal --- .github/workflows/build.yml | 3 ++- Makefile | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3edfbe8..d34e244 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,7 @@ on: pull_request: permissions: + contents: read contents: write jobs: @@ -20,6 +21,6 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.22" + go-version: "1.22.6" - name: Compile FireFly CLI run: make diff --git a/Makefile b/Makefile index e2144dc..881e3f8 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ all: format build lint test tidy format: ## Formats all go code gofmt -s -w . test: deps - $(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s ${TEST_ARGS} + $(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=60s ${TEST_ARGS} build: ## Builds all go code cd ff && go build -ldflags="-X 'github.com/hyperledger/firefly-cli/cmd.BuildDate=$(DATE)' -X 'github.com/hyperledger/firefly-cli/cmd.BuildCommit=$(GITREF)'" install: ## Installs the package @@ -43,4 +43,4 @@ help: ## Show this help @echo 'targets:' @egrep '^(.+)\:\ .*##\ (.+)' ${MAKEFILE_LIST} | sed 's/:.*##/#/' | column -t -c 2 -s '#' tidy: - $(VGO) mod tidy \ No newline at end of file + $(VGO) mod tidy From 10f7aeb12d16a9663281e88611d31a0491e41f9c Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 11:32:51 +0200 Subject: [PATCH 2/8] remove contents in workflow not needed Signed-off-by: Enrique Lacal --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d34e244..f09e7a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,6 @@ on: pull_request: permissions: - contents: read contents: write jobs: From 2371e701d57a3417e1588d21a2e66ba6e59ed80a Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 12:01:16 +0200 Subject: [PATCH 3/8] try setting go to v1.22.6 Signed-off-by: Enrique Lacal --- go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 57cb66e..6745e0b 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ module github.com/hyperledger/firefly-cli -go 1.22 +go 1.22.6 -toolchain go1.22.0 +toolchain go1.22.6 require ( blockwatch.cc/tzgo v1.17.4 From 2e5f30d092c2dca1726a55813bb5909185f513bf Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 12:02:31 +0200 Subject: [PATCH 4/8] clean go mod Signed-off-by: Enrique Lacal --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index 6745e0b..e35c3f7 100644 --- a/go.mod +++ b/go.mod @@ -18,8 +18,6 @@ module github.com/hyperledger/firefly-cli go 1.22.6 -toolchain go1.22.6 - require ( blockwatch.cc/tzgo v1.17.4 github.com/briandowns/spinner v1.23.0 From 36a65388a1ac9d58d50e23d77d853039e2602e36 Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 12:07:20 +0200 Subject: [PATCH 5/8] try with go 1.23 Signed-off-by: Enrique Lacal --- go.mod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e35c3f7..082f67f 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,9 @@ module github.com/hyperledger/firefly-cli -go 1.22.6 +go 1.23 + +toolchain go1.23 require ( blockwatch.cc/tzgo v1.17.4 From c30700a150c7f5aa0752b7695140ab56cbfda90d Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 12:08:44 +0200 Subject: [PATCH 6/8] update workflow Signed-off-by: Enrique Lacal --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f09e7a9..f58102f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,6 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.22.6" + go-version: "1.23" - name: Compile FireFly CLI run: make From 4d727314eee0737e24772219172d62016c08c30c Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 12:09:51 +0200 Subject: [PATCH 7/8] Revert back to Go 1.22.6 Signed-off-by: Enrique Lacal --- .github/workflows/build.yml | 2 +- go.mod | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f58102f..3edfbe8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,6 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.23" + go-version: "1.22" - name: Compile FireFly CLI run: make diff --git a/go.mod b/go.mod index 082f67f..6e93f18 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ module github.com/hyperledger/firefly-cli -go 1.23 +go 1.22 -toolchain go1.23 +toolchain go1.22.6 require ( blockwatch.cc/tzgo v1.17.4 From 6f2e3276c0a9b05c7a4c89b8a4f95e150b708c3e Mon Sep 17 00:00:00 2001 From: Enrique Lacal Date: Wed, 2 Oct 2024 13:54:41 +0200 Subject: [PATCH 8/8] revert test timeout Signed-off-by: Enrique Lacal --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 881e3f8..86b7789 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ all: format build lint test tidy format: ## Formats all go code gofmt -s -w . test: deps - $(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=60s ${TEST_ARGS} + $(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s ${TEST_ARGS} build: ## Builds all go code cd ff && go build -ldflags="-X 'github.com/hyperledger/firefly-cli/cmd.BuildDate=$(DATE)' -X 'github.com/hyperledger/firefly-cli/cmd.BuildCommit=$(GITREF)'" install: ## Installs the package