Skip to content

Commit af0c4ff

Browse files
authored
[chore][codecov] Add all packages to coverage results (#6117)
* [chore][codecov] Add all packages to coverage results * Rename variables in make * lower target to account for broadened scope * Change requested by Dmitrii - Use automated approach to find all mods, rather than manual * Update Makefile.Common
1 parent 6037cc8 commit af0c4ff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ coverage:
1313
project:
1414
default:
1515
enabled: yes
16-
target: 50%
16+
target: 30%
1717
patch:
1818
default:
1919
enabled: yes

Makefile.Common

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ IMPI=impi
4242
BUILD_TYPE?=release
4343

4444
# COVER_PKGS is the list of packages to include in the test coverage
45-
COVER_PKGS := $(shell go list ./... | tr "\n" ",")
45+
EXCLUDE_MODS=-not -path "./examples/*"
46+
FIND_MOD_ARGS=-type f -name "go.mod"
47+
COVER_PKGS := $(shell find . $(EXCLUDE_MODS) $(FIND_MOD_ARGS) -execdir $(GOCMD) list ./... \; | tr "\n" "," )
48+
4649
COVER_DIR?=$(PWD)/coverage
4750
COVER_OPTS?=-cover -covermode=atomic -coverpkg $(COVER_PKGS) -args -test.gocoverdir="$(COVER_DIR)"
4851

0 commit comments

Comments
 (0)