Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ jobs:
go-version: 1.15
- name: Check-out code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Run unit tests
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage.txt

tidy:
runs-on: [ubuntu-latest]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all: test

.PHONY: test
test:
$(GO) test -v ./...
$(GO) test -v -coverprofile coverage.txt -covermode=atomic -coverpkg=antrea.io/libOpenflow/common/...,antrea.io/libOpenflow/openflow15/...,antrea.io/libOpenflow/protocol/...,antrea.io/libOpenflow/util/... antrea.io/libOpenflow/...

# code linting
.golangci-bin:
Expand Down
32 changes: 32 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
codecov:
branch: main
require_ci_to_pass: no

comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: no
require_base: no
require_head: no
after_n_builds: 1
show_carryforward_flags: true

github_checks:
annotations: true

coverage:
status:
patch:
default:
target: 70%

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 70% coverage required in libOpenflow?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For each Patch(newly added code lines), 70% coverage is required.

threshold: 5%
base: auto
only_pulls: false
project:
default:
target: auto
threshold: 0.1%

flag_management:
default_rules:
carryforward: true