Skip to content

Commit 514126c

Browse files
author
Paulo Gomes
committed
Fix make test on arm64 runners
The environment variables set at the Makefile were causing go install to yield a corrupted file for setup-envtest. To fix the issue, such operation is now always executed in a clean bash. Signed-off-by: Paulo Gomes <[email protected]>
1 parent e5d032f commit 514126c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.github/workflows/e2e.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ jobs:
5757
with:
5858
go-version: 1.17.x
5959
- name: Run tests
60-
run: |
61-
mkdir tmp-download; cd tmp-download; go mod init go-download;
62-
GOBIN="${GITHUB_WORKSPACE}/build/gobin" go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
63-
cd ..; rm -rf tmp-download
64-
make test
60+
run: make test
6561
- name: Prepare
6662
id: prep
6763
run: |

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ TMP_DIR=$$(mktemp -d) ;\
224224
cd $$TMP_DIR ;\
225225
go mod init tmp ;\
226226
echo "Downloading $(2)" ;\
227-
go install $(2) ;\
227+
env -i bash -c "GOBIN=$(GOBIN) PATH=$(PATH) GOPATH=$(shell go env GOPATH) GOCACHE=$(shell go env GOCACHE) go install $(2)" ;\
228228
rm -rf $$TMP_DIR ;\
229229
}
230230
endef

0 commit comments

Comments
 (0)