From 7e22c1938303a17794fc529de64f9e9ba0e76257 Mon Sep 17 00:00:00 2001 From: Ryan Zhang Date: Wed, 17 Mar 2021 19:13:24 -0700 Subject: [PATCH] move out rollout e2e (#1205) * move out rollout e2e * fix go workflow --- .github/workflows/go.yml | 51 ++++++++++++++++++++++++++++++++++++++++ Makefile | 5 +++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 17a476bf1..1bc25d6e4 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -123,6 +123,57 @@ jobs: - name: Clean up testdata run: make compatibility-testdata-cleanup + e2e-rollout-tests: + runs-on: aliyun + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Get dependencies + run: | + go get -v -t -d ./... + + - name: Setup Kind + uses: engineerd/setup-kind@v0.5.0 + with: + version: ${{ env.KIND_VERSION }} + skipClusterCreation: true + + - name: Setup Kind Cluster + run: | + kind delete cluster + kind create cluster + + - name: Load Image to kind cluster + run: make kind-load + + - name: Run Make + run: make + + - name: Run Make Manager + run: make manager + + - name: Prepare for e2e tests + run: | + make e2e-cleanup + make e2e-setup + + - name: Wait for e2e preparation ready + run: | + timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:38081/api/workloads)" != "200" ]]; do sleep 5; done' || false + + - name: Run e2e rollout tests + run: make e2e-rollout-test + + - name: Cleanup image + if: ${{ always() }} + run: make image-cleanup + e2e-tests: runs-on: ubuntu-20.04 needs: detect-noop diff --git a/Makefile b/Makefile index 8457c1372..6be27675d 100644 --- a/Makefile +++ b/Makefile @@ -142,9 +142,12 @@ e2e-api-test: ginkgo -v -r e2e/apiserver ginkgo -v -r e2e/application +e2e-rollout-test: + ginkgo -v --focus="Cloneset based rollout tests" ./test/e2e-test/ + e2e-test: # Run e2e test - ginkgo -v ./test/e2e-test + ginkgo -v --skip="Cloneset based rollout tests" ./test/e2e-test @$(OK) tests pass compatibility-test: vet lint staticcheck generate-compatibility-testdata