From e5eef985baf648677dba52d3c124b15c9011367a Mon Sep 17 00:00:00 2001 From: Brandon Wagner Date: Thu, 29 Jul 2021 10:14:02 -0500 Subject: [PATCH] Slow (#475) * Revert "remove deps (#473)" This reverts commit 44f3c669aa4ccbeecd7b15c5b6cb6cdd4a461af5. * Revert "fast release (#472)" This reverts commit d0519cb2e27b9c11b45cae3617f74eb3e500ee2d. * Revert "remove session token (#471)" This reverts commit 91b2e8faa4b5efd869754330662f31fe8cb8995f. --- .github/workflows/ci.yml | 110 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5dfce09..1285c948 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,115 @@ env: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} jobs: + + fastTests: + name: Fast Tests and Lints + runs-on: ubuntu-20.04 + 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: Unit Tests + run: make unit-test + + - name: Lints + run: make spellcheck shellcheck helm-lint + + - name: License Check + run: make license-test + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v2.5.2 + + - name: Generate K8s YAML + run: make generate-k8s-yaml + + buildLinux: + name: Build Linux Binaries + runs-on: ubuntu-20.04 + 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: Build Linux Binaries + run: make build-binaries + + buildLinuxDocker: + name: Build Linux Docker Images + runs-on: ubuntu-20.04 + 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: Build Linux Docker Images + run: make build-docker-images + + buildWindows: + name: Build Windows Binaries + runs-on: windows-2019 + 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: Build Windows Binaries + run: choco install make && choco install zip && RefreshEnv.cmd && make build-binaries-windows + + buildWindowsDocker: + name: Build Windows Docker Images + runs-on: windows-2019 + 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: 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 }} + + - 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 }} + releaseLinux: name: Release Linux runs-on: ubuntu-20.04 + needs: [e2e, buildWindows, buildWindowsDocker, buildLinux, buildLinuxDocker, fastTests] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - name: Set up Go 1.x @@ -30,10 +136,12 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} releaseWindows: name: Release Windows runs-on: windows-2019 + needs: [e2e, buildWindows, buildWindowsDocker, buildLinux, buildLinuxDocker, fastTests] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - name: Set up Go 1.x @@ -49,6 +157,7 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} release: name: Release @@ -75,6 +184,7 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }} - name: Create NTH README Update PR run: make create-release-prep-pr-readme