-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add code coverage reporting Signed-off-by: John Collier <jcollier@redhat.com> * Update PR template Signed-off-by: John Collier <jcollier@redhat.com> * Remove incorrect license Signed-off-by: John Collier <jcollier@redhat.com> Signed-off-by: John Collier <jcollier@redhat.com>
- Loading branch information
1 parent
25d4dc0
commit 0f8c1eb
Showing
5 changed files
with
404 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# See http://docs.codecov.io/docs/coverage-configuration | ||
coverage: | ||
precision: 2 # 2 = xx.xx%, 0 = xx% | ||
round: down | ||
# For example: 20...60 would result in any coverage less than 20% | ||
# would have a red background. The color would gradually change to | ||
# green approaching 60%. Any coverage over 60% would result in a | ||
# solid green color. | ||
range: "20...60" | ||
|
||
status: | ||
# project will give us the diff in the total code coverage between a commit | ||
# and its parent | ||
project: yes | ||
# Patch gives just the coverage of the patch | ||
patch: yes | ||
# changes tells us if there are unexpected code coverage changes in other files | ||
# which were not changed by the diff | ||
changes: yes | ||
|
||
# See http://docs.codecov.io/docs/ignoring-paths | ||
ignore: | ||
- "assets/*" | ||
- "build/*" | ||
- "deploy/*" | ||
- "hack/*" | ||
- "manifests/*" | ||
- "openshift-ci/*" | ||
- "vendor/*" | ||
- "Makefile" | ||
- ".travis.yml" | ||
|
||
# See http://docs.codecov.io/docs/pull-request-comments-1 | ||
comment: | ||
layout: "diff, files" | ||
behavior: "" | ||
# default = posts once then update, posts new if delete | ||
# once = post once then updates | ||
# new = delete old, post new | ||
# spammy = post new |
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
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
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,21 @@ | ||
name: Code Coverage Report | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.1 | ||
with: | ||
persist-credentials: false | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Run tests | ||
run: cd index/server && go test ./... -coverprofile cover.out | ||
- name: Codecov | ||
uses: codecov/codecov-action@v2.1.0 |
Oops, something went wrong.