From 636657b02bd7de94f7a39eb2281027e18d1ed0ad Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 4 Oct 2024 22:02:03 +0800 Subject: [PATCH] Problem: fail test is not reported in ci (#1622) for more info, https://github.com/crypto-org-chain/cronos/actions/runs/11176833047/job/31071047983 --- .github/workflows/build.yml | 3 +-- Makefile | 16 ++++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20f1250215..e309e8e155 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,8 +74,7 @@ jobs: signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" - name: test & coverage report creation run: | - nix develop -c make test - nix develop .#rocksdb -c make test-versiondb + nix develop .#rocksdb -c make test test-versiondb if: steps.changed-files.outputs.any_changed == 'true' - name: filter out proto files run: | diff --git a/Makefile b/Makefile index 784248ea05..82246b56d7 100644 --- a/Makefile +++ b/Makefile @@ -98,15 +98,19 @@ build: check-network print-ledger go.sum install: check-network print-ledger go.sum @go install -mod=readonly $(BUILD_FLAGS) ./cmd/cronosd -test: - @go test -v -mod=readonly $(PACKAGES) -coverprofile=$(COVERAGE) -covermode=atomic - @cd memiavl; go test -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic; cd .. - @cd store; go test -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic; cd .. +test: test-memiavl test-store + @go test -v -mod=readonly $(PACKAGES) -coverprofile=$(COVERAGE) -covermode=atomic; + +test-memiavl: + @cd memiavl; go test -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic; + +test-store: + @cd store; go test -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic; test-versiondb: - @cd versiondb; go test -tags rocksdb -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic; cd .. + @cd versiondb; go test -tags=objstore,rocksdb -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic; -.PHONY: clean build install test +.PHONY: clean build install test test-memiavl test-store test-versiondb clean: rm -rf $(BUILDDIR)/