sigs.k8s.io/kubebuilder/v3@v3.14.0/.github/workflows/test-sample-go.yml (about) 1 name: project-v4-sample 2 3 on: 4 push: 5 pull_request: 6 7 jobs: 8 test: 9 name: Run on Ubuntu 10 runs-on: ubuntu-latest 11 env: 12 KIND_K8S_VERSION: v1.29.0 13 tools_k8s_version: 1.29.0 14 kind_version: 0.20.0 15 steps: 16 - name: Clone the code 17 uses: actions/checkout@v4 18 19 - name: Setup Go 20 uses: actions/setup-go@v5 21 with: 22 go-version: '~1.21' 23 24 - name: Install Kind 25 run: go install sigs.k8s.io/kind@v$kind_version 26 27 28 - name: Install setup-envtest 29 run: go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest 30 31 - name: Install e2e tools with setup-envtest 32 run: setup-envtest use $tools_k8s_version 33 34 - name: Create kind cluster 35 run: kind create cluster 36 37 - name: Prepare the environment 38 run: | 39 KUSTOMIZATION_FILE_PATH="testdata/project-v4/config/default/kustomization.yaml" 40 sed -i '25s/^#//' $KUSTOMIZATION_FILE_PATH 41 sed -i '27s/^#//' $KUSTOMIZATION_FILE_PATH 42 sed -i '42s/^#//' $KUSTOMIZATION_FILE_PATH 43 sed -i '46,143s/^#//' $KUSTOMIZATION_FILE_PATH 44 45 - name: Test 46 run: | 47 cd testdata/project-v4 48 go get -u ./... 49 go mod tidy 50 make test-e2e 51