Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix presubmit unit test run #50

Merged
merged 1 commit into from
May 14, 2024
Merged
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
13 changes: 1 addition & 12 deletions .prow.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
presubmits:
- name: presubmit-nephio-go-test
decorate: true
run_if_changed: "(\\.go|Makefile)$"
run_if_changed: "(\\.go|Makefile|\\.mk)$"
spec:
containers:
- image: nephio/gotests:1782782171367346176
command:
- make
args:
- ci-unit
- name: presubmit-porch-e2e
decorate: true
optional: true
run_if_changed: "(\\.go|Makefile)$"
spec:
containers:
- image: nephio/gotests:1782782171367346176
command:
- make
args:
- ci-test-porch
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,11 @@ generate: generate-api
tidy:
@for f in $(MODULES); do (cd $$f; echo "Tidying $$f"; go mod tidy) || exit 1; done

.PHONY: test-porch
test-porch:
#@for f in $(MODULES); do (cd $$f; echo "Testing $$f"; E2E=1 go test -v -race --count=1 ./...) || exit 1; done
@for f in $(MODULES); do (cd $$f; echo "Testing $$f"; go test -v -race --count=1 ./...) || exit 1; done

.PHONY: configure-git
configure-git:
git config --global --add user.name test
git config --global --add user.email [email protected]

.PHONY: ci-test-porch
ci-test-porch: configure-git test-porch

.PHONY: ci-unit
ci-unit: configure-git test

Expand Down
2 changes: 1 addition & 1 deletion default-go-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ unit-clean: ## Clean up the artifacts created by the unit tests
ifeq ($(CONTAINER_RUNNABLE), 0)
$(CONTAINER_RUNTIME) system prune -f
endif
rm ${TEST_COVERAGE_FILE} ${TEST_COVERAGE_HTML_FILE} ${TEST_COVERAGE_FUNC_FILE} > /dev/null 2>&1
rm -f ${TEST_COVERAGE_FILE} ${TEST_COVERAGE_HTML_FILE} ${TEST_COVERAGE_FUNC_FILE} > /dev/null 2>&1
Loading