diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8177fd7c6..555313bf3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -25,8 +25,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Setup go uses: actions/setup-go@v5 @@ -70,13 +68,38 @@ jobs: max_attempts: 3 command: make verify.generators - install-with-kustomize: + samples: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 + + - name: Setup go + uses: actions/setup-go@v5 with: - fetch-depth: 0 + go-version-file: go.mod + + - name: Create k8s KinD Cluster + uses: helm/kind-action@v1.10.0 + + - uses: jdx/mise-action@v2 + with: + install: false + + - name: Verify installing CRDs via kustomize works + run: make install + + - name: Install and delete each sample one by one + run: make test.samples + + - name: Verify that uninstalling operator CRDs via kustomize works + run: make uninstall + + install-with-kustomize: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 - name: Setup go uses: actions/setup-go@v5 @@ -122,8 +145,6 @@ jobs: steps: - name: checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: setup golang uses: actions/setup-go@v5 @@ -198,8 +219,6 @@ jobs: steps: - name: checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: setup golang uses: actions/setup-go@v5 @@ -251,8 +270,6 @@ jobs: steps: - name: checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: setup golang uses: actions/setup-go@v5 @@ -400,8 +417,6 @@ jobs: - name: checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: download tests report id: download-coverage @@ -431,6 +446,7 @@ jobs: - install-with-kustomize - build - unit-tests + - samples # - conformance-tests - integration-tests - integration-tests-bluegreen diff --git a/Makefile b/Makefile index a649f710b..9e1bec8f8 100644 --- a/Makefile +++ b/Makefile @@ -372,6 +372,10 @@ test.conformance: KGO_RELEASE=$(TAG) GOTESTFLAGS="$(GOTESTFLAGS)" +.PHONY: test.samples +test.samples: kustomize + find ./config/samples -not -name "kustomization.*" -type f | xargs -I{} bash -c "kubectl apply -f {}; kubectl delete -f {}" + # ------------------------------------------------------------------------------ # Gateway API # ------------------------------------------------------------------------------