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
7 changes: 7 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
- name: Run integration tests
run: |
make docker-test-integration
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: cover.out
flags: unit-tests
name: codecov-unit-test

tidy:
runs-on: [ubuntu-latest]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test-integration:
@echo
@echo "==> Running integration tests <=="
@echo "SOME TESTS WILL FAIL IF NOT RUN AS ROOT!"
$(GO) test antrea.io/ofnet/ofctrl/...
$(GO) test antrea.io/ofnet/ofctrl/... -v -coverprofile cover.out

.PHONY: docker-test-integration
docker-test-integration:
Expand All @@ -54,7 +54,7 @@ endif
-w /usr/src/antrea.io/ofnet \
-v $(DOCKER_CACHE)/gopath:/tmp/gopath \
-v $(DOCKER_CACHE)/gocache:/tmp/gocache \
-v $(CURDIR):/usr/src/antrea.io/ofnet:ro \
-v $(CURDIR):/usr/src/antrea.io/ofnet \
-v /lib/modules:/lib/modules \
ofnet/test test-integration $(USERID) $(GRPID)

35 changes: 35 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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%
threshold: 5%
base: auto
only_pulls: false
project:
default:
target: auto
threshold: 0.3%

flag_management:
default_rules:
carryforward: true

ignore:
- "**/testing/*.go"