diff --git a/.github/workflows/gen_coverage.yaml b/.github/workflows/coverage.yaml similarity index 74% rename from .github/workflows/gen_coverage.yaml rename to .github/workflows/coverage.yaml index a619e3f..200aa02 100644 --- a/.github/workflows/gen_coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -1,12 +1,13 @@ name: Generate Test Coverage -on: [pull_request, push, workflow_dispatch] +on: + workflow_dispatch: jobs: build: runs-on: ${{ matrix.os }} env: - GO111MODULE: on + GO111MODULE: on strategy: matrix: os: [ubuntu-latest, windows-latest] @@ -21,9 +22,7 @@ jobs: - name: Gather dependencies run: go mod download - name: Test - run: | - go test -v -coverpkg ./... -cover ./... -coverprofile coverage.out - go tool cover -func coverage.out -o coverage.out + run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..6c1d48c --- /dev/null +++ b/codecov.yml @@ -0,0 +1,20 @@ +comment: true + +coverage: + range: "70...100" + precision: 1 + status: + patch: + default: + informational: true + project: + default: + informational: true + +github_checks: + annotations: true + +ignore: + - "**.pb.go" + - "mock_**_test.go" + - "**/mocks/*"