From aba9b8df9a87adf5ca9897375a46ccc68b13257d Mon Sep 17 00:00:00 2001 From: Brandon Wagner Date: Tue, 24 Aug 2021 13:22:17 -0500 Subject: [PATCH] Release Faster (#486) * Do not run tests again on release since they've been run at least 2 times before. * remove needs * fix conditions --- .github/workflows/ci.yml | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23c06d54..5355a6ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: fastTests: name: Fast Tests and Lints runs-on: ubuntu-20.04 + if: ${{ !contains(github.ref, 'refs/tags/') }} steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -43,6 +44,7 @@ jobs: buildLinux: name: Build Linux Binaries runs-on: ubuntu-20.04 + if: ${{ !contains(github.ref, 'refs/tags/') }} steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -57,6 +59,7 @@ jobs: buildLinuxDocker: name: Build Linux Docker Images runs-on: ubuntu-20.04 + if: ${{ !contains(github.ref, 'refs/tags/') }} steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -72,6 +75,7 @@ jobs: buildWindows: name: Build Windows Binaries runs-on: windows-2019 + if: ${{ !contains(github.ref, 'refs/tags/') }} steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -87,6 +91,7 @@ jobs: buildWindowsDocker: name: Build Windows Docker Images runs-on: windows-2019 + if: ${{ !contains(github.ref, 'refs/tags/') }} steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -99,28 +104,28 @@ jobs: - name: Build Windows Docker Images run: choco install make && RefreshEnv.cmd && make build-docker-images-windows - # e2e: - # name: E2E Tests - # runs-on: ubuntu-20.04 - # strategy: - # matrix: - # k8sVersion: ["1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] - # steps: - # - name: Set up Go 1.x - # uses: actions/setup-go@v2 - # with: - # go-version: ${{ env.DEFAULT_GO_VERSION }} + e2e: + name: E2E Tests + runs-on: ubuntu-20.04 + if: ${{ !contains(github.ref, 'refs/tags/') }} + strategy: + matrix: + k8sVersion: ["1.16", "1.17", "1.18", "1.19", "1.20", "1.21"] + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ${{ env.DEFAULT_GO_VERSION }} - # - name: Check out code into the Go module directory - # uses: actions/checkout@v2 + - name: Check out code into the Go module directory + uses: actions/checkout@v2 - # - name: E2E Tests - # run: test/k8s-local-cluster-test/run-test -v ${{ matrix.k8sVersion }} + - name: E2E Tests + run: test/k8s-local-cluster-test/run-test -v ${{ matrix.k8sVersion }} releaseLinux: name: Release Linux runs-on: ubuntu-20.04 - needs: [buildWindows, buildWindowsDocker, buildLinux, buildLinuxDocker, fastTests] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - name: Set up Go 1.x @@ -141,7 +146,6 @@ jobs: releaseWindows: name: Release Windows runs-on: windows-2019 - needs: [buildWindows, buildWindowsDocker, buildLinux, buildLinuxDocker, fastTests] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - name: Set up Go 1.x