Skip to content

Commit

Permalink
Do not mess with git except in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbelamaric committed Dec 19, 2023
1 parent bf9f38e commit 769c8d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ presubmits:
command:
- make
args:
- unit
- ci-unit
- name: presubmit-porch-e2e
decorate: true
optional: true
Expand All @@ -19,4 +19,4 @@ presubmits:
command:
- make
args:
- test-porch
- ci-test-porch
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ tidy:
test-porch:
@for f in $(MODULES); do (cd $$f; echo "Testing $$f"; E2E=1 go test -race --count=1 ./...) || exit 1; done

.PHONY: configure-git
configure-git:
git config --global --add user.name test
git config --global --add user.email test@nephio.org

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

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


PORCH = $(BUILDDIR)/porch

.PHONY: run-local
Expand Down
2 changes: 0 additions & 2 deletions default-go-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ ifeq ($(CONTAINER_RUNNABLE), 0)
go tool cover -html=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_HTML_FILE}; \
go tool cover -func=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_FUNC_FILE}"
else
git config --global --add user.name test
git config --global --add user.email test@nephio.org
go test ./... -v -coverprofile ${TEST_COVERAGE_FILE}
go tool cover -html=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_HTML_FILE}
go tool cover -func=${TEST_COVERAGE_FILE} -o ${TEST_COVERAGE_FUNC_FILE}
Expand Down

0 comments on commit 769c8d0

Please sign in to comment.