From e84a760ae2871b901bf0ca5571634d45dff1e92f Mon Sep 17 00:00:00 2001 From: Miguel Duarte Barroso Date: Tue, 22 Feb 2022 17:38:59 +0100 Subject: [PATCH] github: fix test actions Pass the path to the kubeconfig, and cleanup some variables that are not in use. Also, ensure that the e2e tests are not executed when the `hack/test-go.sh` script is executed - that is for the unit tests only. Signed-off-by: Miguel Duarte Barroso --- .github/workflows/test.yml | 3 +-- hack/test-go.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4edd3a725..facc3867c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,8 +65,7 @@ jobs: runs-on: ubuntu-latest env: NUMBER_OF_COMPUTE_NODES: 5 - NUMBER_OF_THRASH_ITER: 20 - FILL_PERCENT_CAPACITY: 20 + KUBECONFIG: ~/.kube/config steps: - name: Set up Go version uses: actions/setup-go@v1 diff --git a/hack/test-go.sh b/hack/test-go.sh index b5e90ff7e..d92903e94 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -5,4 +5,4 @@ set -e -x echo "Linting go code..." golint ./cmd ./pkg echo "Running go tests..." -KUBEBUILDER_ASSETS="$(pwd)/bin" go test -v -covermode=count -coverprofile=coverage.out ./... +KUBEBUILDER_ASSETS="$(pwd)/bin" go test -v -covermode=count -coverprofile=coverage.out $(go list ./... | grep -v e2e | tr "\n" " ")