From 5aa153e64c92072e8681e218874b910c9469b61c Mon Sep 17 00:00:00 2001 From: houwenchen Date: Thu, 19 Oct 2023 23:48:06 +0800 Subject: [PATCH] slove cicd issue Signed-off-by: houwenchen --- .github/workflows/build.yml | 13 ++++++++++++- Makefile | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 794f0a99..9db7b199 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,11 +60,22 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Set up Go 1.19 + uses: actions/setup-go@v4 + with: + go-version: 1.19.9 + cache: false + - name: Unit test run: make test - name: Upload Coverage Report - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.txt + name: coverage-$(date +%s) + flags: unittests bdd-test: needs: ['unit-test'] diff --git a/Makefile b/Makefile index 1d14f2f1..6cceceae 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ format: .PHONY: test test: format @echo "--> Running go test" ; - @go test $(UNIT_TEST_PACKAGES) + @go test $(UNIT_TEST_PACKAGES) -cover -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt .PHONY: deps