Skip to content

Commit 0981826

Browse files
fix(makefile): exit 1 if we have an error in one of the module (#4472)
Signed-off-by: Thomas Poignant <[email protected]>
1 parent 8eaf4ac commit 0981826

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ GOCMD=go
22
TINYGOCMD=tinygo
33
GOTEST=$(GOCMD) test
44
GOVET=$(GOCMD) vet
5-
ALL_GO_MOD_DIRS := ./ ./modules/evaluation ./modules/core ./cmd/wasm
5+
ALL_GO_MOD_DIRS := ./modules/core ./modules/evaluation ./cmd/wasm ./
66

77
# In CI we disable workspace mode.
88
ifeq ($(CI),true)
@@ -118,7 +118,11 @@ bump-helm-chart-version: ## Bump Helm chart version (usage: make bump-helm-chart
118118

119119
## Test:
120120
test: ## Run the tests of the project
121-
@$(foreach module, $(ALL_GO_MOD_DIRS), (echo "→ Testing $(module)"; cd $(module) && $(GOWORK_ENV) $(GOCMD) test -v -race -tags=docker ./...);)
121+
@for module in $(ALL_GO_MOD_DIRS); do \
122+
echo "→ Testing $$module"; \
123+
cd $$module && $(GOWORK_ENV) $(GOCMD) test -v -race -tags=docker ./... || exit 1; \
124+
cd - >/dev/null; \
125+
done
122126

123127
provider-tests: ## Run the integration tests for the Open Feature Providers
124128
./openfeature/provider_tests/integration_tests.sh

0 commit comments

Comments
 (0)