[WS-3147] use Kind for CI #83
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: 'CI: verify chart' | |
permissions: | |
id-token: write | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
verify-template: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azure/setup-helm@v3 | |
with: | |
version: v3.13.2 | |
- name: Test with template | |
run: helm template --output-dir generated mycms websight-cms | |
- name: Run chart helm-unittest | |
run: | | |
cd websight-cms | |
helm plugin install https://github.com/helm-unittest/helm-unittest.git | |
helm unittest -f 'tests/unit/*.yaml' . | |
verify-chart-deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.6' | |
- name: Setup Kind | |
run: go install sigs.k8s.io/[email protected] | |
- name: Create K8s cluster with Kind | |
run: kind create cluster --config .github/cluster/kind-cluster.yaml | |
- uses: azure/setup-helm@v3 | |
with: | |
version: v3.13.2 | |
- name: Install Nginx Ingress Controller | |
run: | | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml | |
kubectl -n ingress-nginx rollout status deployment ingress-nginx-controller | |
- name: Install WebSight CMS and verify deployment | |
run: .github/scripts/ci-helm-install-and-test.sh |