Skip to content

test: fix grpc health check #535

test: fix grpc health check

test: fix grpc health check #535

Workflow file for this run

name: 'Test Charts'
on: 'pull_request'
jobs:
test:
runs-on: 'ubuntu-latest'
permissions:
contents: 'read'
id-token: 'write'
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
k8s:
- version: v1.25
kindest-image-tag: 'v1.25.16@sha256:5da57dfc290ac3599e775e63b8b6c49c0c85d3fec771cd7d55b45fae14b38d3b'
- version: v1.26
kindest-image-tag: 'v1.26.15@sha256:84333e26cae1d70361bb7339efb568df1871419f2019c80f9a12b7e2d485fe19'
- version: v1.27
kindest-image-tag: 'v1.27.13@sha256:17439fa5b32290e3ead39ead1250dca1d822d94a10d26f1981756cd51b24b9d8'
- version: v1.28
kindest-image-tag: 'v1.28.9@sha256:dca54bc6a6079dd34699d53d7d4ffa2e853e46a20cd12d619a09207e35300bd0'
- version: v1.29
kindest-image-tag: 'v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8'
- version: v1.30
kindest-image-tag: 'v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e'
helm-version:
- latest
include:
- k8s:
version: v1.30
kindest-image-tag: 'v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e'
helm-version: v3.9.0
name: 'K8s version ${{ matrix.k8s.version }} - Helm version ${{ matrix.helm-version }}'
steps:
- id: 'checkout'
name: Check The Repo Out
uses: 'actions/checkout@v4'
with:
fetch-depth: 0
- name: Get Changed Test Relevant Files
id: 'list-changed-test'
uses: tj-actions/changed-files@v45
with:
files: |
charts/zitadel/**
examples/**/*.yaml
go.mod
go.sum
- id: 'add-cockroachdb-repo'
name: Add The CockroachDB Helm Repo
run: 'helm repo add cockroachdb https://charts.cockroachdb.com/'
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'create-kind'
name: Create Kubernetes Cluster with KinD
uses: 'helm/kind-action@v1.10.0'
with:
node_image: 'kindest/node:${{ matrix.k8s.kindest-image-tag }}'
version: 'v0.23.0'
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'setup-go'
uses: actions/setup-go@v5
with:
go-version: '1.22.3'
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'test'
name: Run Go Tests
run: 'go test -p 1 ./...'
if: steps.list-changed-test.outputs.any_changed == 'true'
- id: 'zitadel-test-namespaces'
name: Grep Created Namespaces
run: |
echo "pgInsecure=$(kubectl get namespaces --output name | grep 1-postgres-insecure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "pgSecure=$(kubectl get namespaces --output name | grep 2-postgres-secure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "crInsecure=$(kubectl get namespaces --output name | grep 3-cockroach-insecure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "crSecure=$(kubectl get namespaces --output name | grep 4-cockroach-secure | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "refSecrets=$(kubectl get namespaces --output name | grep 5-referenced-secrets | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "machineUser=$(kubectl get namespaces --output name | grep 6-machine-user | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
echo "selfSigned=$(kubectl get namespaces --output name | grep 7-self-signed | cut -d / -f 2)" >> "$GITHUB_OUTPUT"
if: failure()
- id: 'namespace-report-pg-insecure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.pgInsecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.pgInsecure }}
- id: 'namespace-report-pg-secure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.pgSecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.pgSecure }}
- id: 'namespace-report-cr-insecure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.crInsecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.crInsecure }}
- id: 'namespace-report-cr-secure'
name: Show ${{ steps.zitadel-test-namespaces.outputs.crSecure }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.crSecure }}
- id: 'namespace-report-ref-secrets'
name: Show ${{ steps.zitadel-test-namespaces.outputs.refSecrets }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.refSecrets }}
- id: 'namespace-report-machine-user'
name: Show ${{ steps.zitadel-test-namespaces.outputs.machineUser }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.machineUser }}
- id: 'namespace-report-self-signed'
name: Show ${{ steps.zitadel-test-namespaces.outputs.selfSigned }} Namespace
uses: jupyterhub/action-k8s-namespace-report@v1
if: failure()
with:
namespace: ${{ steps.zitadel-test-namespaces.outputs.selfSigned }}