@@ -213,88 +213,87 @@ jobs:
213213 - release-helm
214214
215215 # publish helm chart after the release of container images is complete
216- # run-helm-tests:
217- # name: Run helm integration tests
218- # if: startsWith(github.ref, 'refs/tags/v')
219- # needs:
220- # - push-virtual-tag
221- # runs-on: ubuntu-latest
222-
223- # permissions:
224- # contents: read
225- # checks: write
226- # statuses: write
227-
228- # strategy:
229- # fail-fast: false
230- # matrix:
231- # k8s-version: [v1.26.12 , v1.27 .9, v1.28 .5, v1.29.0 ]
232-
233- # steps:
234- # - name: Checkout
235- # uses: actions/checkout@v4
236- # with:
237- # fetch-depth: 0
238-
239- # - name: Import environment variables from file
240- # run: cat ".github/env" >> $GITHUB_ENV
241-
242- # - name: Install Go
243- # uses: actions/setup-go@v5
244- # with:
245- # go-version: "${{ env.golang-version }}"
246-
247- # - name: Start minikube
248- # uses: medyagh/setup-minikube@master
249- # with:
250- # memory: 4000m
251- # kubernetes-version: ${{ matrix.k8s-version }}
252-
253- # - name: Install Helm
254- # uses: azure/setup-helm@v4
255- # with:
256- # token: ${{ secrets.GITHUB_TOKEN }}
257- # id: install
258-
259- # - name: Extract Docker metadata
260- # id: meta
261- # uses: docker/metadata-action@v5
262- # with:
263- # images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
264-
265- # - name: Install Mondoo Operator Helm chart
266- # run: helm install mondoo-operator charts/mondoo-operator -n mondoo-operator --create-namespace --wait
267-
268- # # Now that dependencies are cached the tests start almost immediately after minikube has started
269- # # this makes tests fail occasionally. This sleep gives the runner some time to become more stable
270- # # before the test execution starts.
271- # - name: Wait a bit for the runner to become more stable
272- # run: kubectl -n kube-system wait --for=condition=Ready pods --all --timeout=60s
273-
274- # - name: Run integration tests
275- # env:
276- # MONDOO_API_TOKEN: ${{ secrets.MONDOO_TEST_ORG_TOKEN }}
277- # run: EXTERNAL_INSTALLATION=1 VERSION=${{ steps.meta.outputs.version }} make test/integration/ci
278-
279- # - uses: actions/upload-artifact@v4 # upload test results
280- # if: success() || failure() # run this step even if previous step failed
281- # with: # upload a combined archive with unit and integration test results
282- # name: test-results-helm-${{ matrix.k8s-version }}
283- # path: integration-tests-helm-${{ matrix.k8s-version }}.xml
284-
285- # - name: Upload test logs artifact
286- # uses: actions/upload-artifact@v4
287- # if: failure()
288- # with:
289- # name: helm-test-logs-${{ matrix.k8s-version }}
290- # path: /home/runner/work/mondoo-operator/mondoo-operator/tests/integration/_output/
216+ run-helm-tests :
217+ name : Run helm integration tests
218+ if : startsWith(github.ref, 'refs/tags/v')
219+ needs :
220+ - push-virtual-tag
221+ runs-on : ubuntu-latest
222+
223+ permissions :
224+ contents : read
225+ checks : write
226+ statuses : write
227+
228+ strategy :
229+ fail-fast : false
230+ matrix :
231+ k8s-version : [v1.31.9 , v1.32 .9, v1.33 .5, v1.34.1 ]
232+
233+ steps :
234+ - name : Checkout
235+ uses : actions/checkout@v4
236+ with :
237+ fetch-depth : 0
238+
239+ - name : Import environment variables from file
240+ run : cat ".github/env" >> $GITHUB_ENV
241+
242+ - name : Install Go
243+ uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
244+ with :
245+ go-version : " ${{ env.golang-version }}"
246+
247+ - name : Start minikube
248+ uses : medyagh/setup-minikube@master
249+ with :
250+ memory : 4000m
251+ kubernetes-version : ${{ matrix.k8s-version }}
252+
253+ - name : Install Helm
254+ uses : azure/setup-helm@v4
255+ with :
256+ token : ${{ secrets.GITHUB_TOKEN }}
257+ id : install
258+
259+ - name : Extract Docker metadata
260+ id : meta
261+ uses : docker/metadata-action@v5
262+ with :
263+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
264+
265+ - name : Install Mondoo Operator Helm chart
266+ run : helm install mondoo-operator charts/mondoo-operator -n mondoo-operator --create-namespace --wait
267+
268+ # Now that dependencies are cached the tests start almost immediately after minikube has started
269+ # this makes tests fail occasionally. This sleep gives the runner some time to become more stable
270+ # before the test execution starts.
271+ - name : Wait a bit for the runner to become more stable
272+ run : kubectl -n kube-system wait --for=condition=Ready pods --all --timeout=60s
273+
274+ - name : Run integration tests
275+ env :
276+ MONDOO_API_TOKEN : ${{ secrets.MONDOO_TEST_ORG_TOKEN }}
277+ run : EXTERNAL_INSTALLATION=1 VERSION=${{ steps.meta.outputs.version }} make test/integration/ci
278+
279+ - uses : actions/upload-artifact@v4 # upload test results
280+ if : success() || failure() # run this step even if previous step failed
281+ with : # upload a combined archive with unit and integration test results
282+ name : test-results-helm-${{ matrix.k8s-version }}
283+ path : integration-tests-helm-${{ matrix.k8s-version }}.xml
284+
285+ - name : Upload test logs artifact
286+ uses : actions/upload-artifact@v4
287+ if : failure()
288+ with :
289+ name : helm-test-logs-${{ matrix.k8s-version }}
290+ path : /home/runner/work/mondoo-operator/mondoo-operator/tests/integration/_output/
291291
292292 report-tests :
293293 name : Report test results
294294 runs-on : ubuntu-latest
295295 needs :
296- - run-olm-e2e
297- # - run-helm-tests
296+ - run-helm-tests
298297 permissions :
299298 actions : read # Required to read the artifact
300299 contents : read # Required to read the source
0 commit comments