name: CI concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true on: push: branches: [master] pull_request: permissions: contents: read env: GO_VERSION: "1.20" jobs: lint: name: Lint runs-on: ubuntu-20.04 timeout-minutes: 20 steps: - name: Checkout repository uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} cache: false - uses: actions/checkout@v4 - uses: golangci/golangci-lint-action@v3 with: version: v1.51.0 args: --timeout=15m --config=.golangci.yml skip-cache: true skip-build-cache: true unit-tests: name: Unit Tests runs-on: ubuntu-latest timeout-minutes: 20 steps: - name: Checkout repository uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@v4 - name: Run Tests run: make test env-tests: name: Envtest Tests runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout repository uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - uses: actions/checkout@v4 - name: Run Tests run: make envtest e2e: name: E2E runs-on: ubuntu-22.04 timeout-minutes: 20 env: CHANGE_MINIKUBE_NONE_USER: true KUBERNETES_VERSION: v1.20.1 MINIKUBE_HOME: /home/circleci MINIKUBE_VERSION: v1.16.0 MINIKUBE_WANTUPDATENOTIFICATION: false MINIKUBE_WANTREPORTERRORPROMPT: false SKAFFOLD_VERSION: v1.17.2 GO111MODULE: "on" steps: - uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - name: Checkout repository uses: actions/checkout@v4 - name: Install Skaffold run: | curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/${SKAFFOLD_VERSION}/skaffold-linux-amd64 chmod +x skaffold sudo mv skaffold /usr/local/bin/ echo /usr/local/bin >> $GITHUB_PATH - name: Install Minikube dependencies run: | sudo apt-get update && sudo apt-get install -y apt-transport-https curl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - cat <&1 | grep -q "Ready=True"; do sleep 1; done - name: Run Tests run: make e2e