π¦ Add quay helm chart π¦ #148
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Install Test | |
on: | |
pull_request: | |
paths: | |
- .github/** | |
- charts/** | |
# Declare default permissions as read only. | |
permissions: read-all | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
install-test: | |
runs-on: ubuntu-latest | |
env: | |
# renovate: datasource=github-releases depName=helm/helm | |
HELM_VERSION: v3.13.3 | |
# renovate: datasource=github-tags depName=python/cpython | |
PYTHON_VERSION: v3.12.1 | |
# renovate: datasource=github-releases depName=kubernetes-sigs/kind | |
KIND_VERSION: v0.20.0 | |
# renovate: datasource=github-releases depName=operator-framework/operator-lifecycle-manager | |
OLM_VERSION: v0.26.0 | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Helm π§° | |
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Setup Python π | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Setup chart-testing π§° | |
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1 | |
- name: Find changed Charts π | |
id: changed-charts | |
run: | | |
changed=$(ct list-changed --target-branch main) | |
echo ${changed} | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Setup kind cluster π§° | |
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 | |
with: | |
version: ${{ env.KIND_VERSION }} | |
if: steps.changed-charts.outputs.changed == 'true' | |
# for helm charts we are testing that require installing operators | |
- name: Setup kind cluster - Install OLM π§° | |
run: | | |
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/install.sh -o install.sh | |
chmod +x install.sh | |
./install.sh ${OLM_VERSION} | |
if: steps.changed-charts.outputs.changed == 'true' | |
# for helm charts we are testing that require ingress | |
- name: Setup kind cluster - Install ingress controller π§° | |
run: | | |
helm repo add haproxy-ingress https://haproxy-ingress.github.io/charts | |
helm install haproxy-ingress haproxy-ingress/haproxy-ingress \ | |
--create-namespace --namespace=ingress-controller \ | |
--set controller.hostNetwork=true | |
kubectl apply -f - <<EOF | |
apiVersion: networking.k8s.io/v1 | |
kind: IngressClass | |
metadata: | |
name: haproxy | |
annotations: | |
ingressclass.kubernetes.io/is-default-class: 'true' | |
spec: | |
controller: haproxy-ingress.github.io/controller | |
EOF | |
if: steps.changed-charts.outputs.changed == 'true' | |
# for helm charts we are testing that require/expect certain default namespaces from Red Hat OpenShift | |
- name: Setup kind cluster - create expected namespaces π§° | |
run: | | |
kubectl create namespace openshift-operators | |
if: steps.changed-charts.outputs.changed == 'true' | |
- name: Run Chart install tests π§ͺ | |
timeout-minutes: 30 | |
run: | | |
ct install --target-branch main --debug --config _test/ct-config.yaml | |
if: steps.changed-charts.outputs.changed == 'true' |