-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from arshamalh/fixing-ci
fix: codecov.
- Loading branch information
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/*" |