From b6f92ed3d31afd17980efa648207e29b92c368c7 Mon Sep 17 00:00:00 2001 From: Windfarer Date: Sun, 25 Jul 2021 22:11:56 +0800 Subject: [PATCH] add codecov (#1195) --- .github/workflows/go.yml | 4 +++- codecov.yml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 codecov.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 63bc4d043..6b192dad9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,9 @@ jobs: run: go build ./... - name: Test - run: go test -race ./... + run: go test -race -coverprofile=coverage.out -covermode=atomic ./... + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) - name: Kratos run: | diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..302bcfd7b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,3 @@ +ignore: + - "examples" + - "**/*.pb.go" \ No newline at end of file