Skip to content

Commit

Permalink
🧹 disable helm tests: (#1073)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Mar 26, 2024
1 parent 9fff3a1 commit ab3245e
Showing 1 changed file with 77 additions and 77 deletions.
154 changes: 77 additions & 77 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,88 +367,88 @@ jobs:
- release-helm

# publish helm chart after the release of container images is complete
run-helm-tests:
name: Run helm integration tests
if: startsWith(github.ref, 'refs/tags/v')
needs:
- push-virtual-tag
runs-on: ubuntu-latest

permissions:
contents: read
checks: write
statuses: write

strategy:
fail-fast: false
matrix:
k8s-version: [v1.26.12, v1.27.9, v1.28.5, v1.29.0]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "${{ env.golang-version }}"

- name: Start minikube
uses: medyagh/setup-minikube@master
with:
memory: 4000m
kubernetes-version: ${{ matrix.k8s-version }}

- name: Install Helm
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: install

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Install Mondoo Operator Helm chart
run: helm install mondoo-operator charts/mondoo-operator -n mondoo-operator --create-namespace --wait

# Now that dependencies are cached the tests start almost immediately after minikube has started
# this makes tests fail occasionally. This sleep gives the runner some time to become more stable
# before the test execution starts.
- name: Wait a bit for the runner to become more stable
run: kubectl -n kube-system wait --for=condition=Ready pods --all --timeout=60s

- name: Run integration tests
env:
MONDOO_API_TOKEN: ${{ secrets.MONDOO_TEST_ORG_TOKEN }}
run: EXTERNAL_INSTALLATION=1 VERSION=${{ steps.meta.outputs.version }} make test/integration/ci

- uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with: # upload a combined archive with unit and integration test results
name: test-results-helm-${{ matrix.k8s-version }}
path: integration-tests-helm-${{ matrix.k8s-version }}.xml

- name: Upload test logs artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: helm-test-logs-${{ matrix.k8s-version }}
path: /home/runner/work/mondoo-operator/mondoo-operator/tests/integration/_output/
# run-helm-tests:
# name: Run helm integration tests
# if: startsWith(github.ref, 'refs/tags/v')
# needs:
# - push-virtual-tag
# runs-on: ubuntu-latest

# permissions:
# contents: read
# checks: write
# statuses: write

# strategy:
# fail-fast: false
# matrix:
# k8s-version: [v1.26.12, v1.27.9, v1.28.5, v1.29.0]

# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: Import environment variables from file
# run: cat ".github/env" >> $GITHUB_ENV

# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version: "${{ env.golang-version }}"

# - name: Start minikube
# uses: medyagh/setup-minikube@master
# with:
# memory: 4000m
# kubernetes-version: ${{ matrix.k8s-version }}

# - name: Install Helm
# uses: azure/setup-helm@v4
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# id: install

# - name: Extract Docker metadata
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# - name: Install Mondoo Operator Helm chart
# run: helm install mondoo-operator charts/mondoo-operator -n mondoo-operator --create-namespace --wait

# # Now that dependencies are cached the tests start almost immediately after minikube has started
# # this makes tests fail occasionally. This sleep gives the runner some time to become more stable
# # before the test execution starts.
# - name: Wait a bit for the runner to become more stable
# run: kubectl -n kube-system wait --for=condition=Ready pods --all --timeout=60s

# - name: Run integration tests
# env:
# MONDOO_API_TOKEN: ${{ secrets.MONDOO_TEST_ORG_TOKEN }}
# run: EXTERNAL_INSTALLATION=1 VERSION=${{ steps.meta.outputs.version }} make test/integration/ci

# - uses: actions/upload-artifact@v4 # upload test results
# if: success() || failure() # run this step even if previous step failed
# with: # upload a combined archive with unit and integration test results
# name: test-results-helm-${{ matrix.k8s-version }}
# path: integration-tests-helm-${{ matrix.k8s-version }}.xml

# - name: Upload test logs artifact
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: helm-test-logs-${{ matrix.k8s-version }}
# path: /home/runner/work/mondoo-operator/mondoo-operator/tests/integration/_output/

report-tests:
name: Report test results
runs-on: ubuntu-latest
needs:
- run-olm-e2e
- run-helm-tests
#- run-helm-tests
permissions:
actions: read # Required to read the artifact
contents: read # Required to read the source
Expand All @@ -472,7 +472,7 @@ jobs:
release-helm:
name: Release helm chart
needs:
- run-helm-tests
- push-virtual-tag
runs-on: ubuntu-latest

permissions:
Expand Down

0 comments on commit ab3245e

Please sign in to comment.