generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (43 loc) · 1.06 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build artifacts
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency: build-${{ github.ref }}
env:
HELM_VERSION: v3.11.3
KIND_VERSION: v0.19.0
CHART_DIRECTORY: chart
defaults:
run:
shell: bash
jobs:
test:
name: Run tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: azure/setup-helm@v3
with:
version: ${{ env.HELM_VERSION }}
- name: Lint Helm chart
run: |
helm lint $CHART_DIRECTORY
- name: Create Kind cluster
uses: helm/kind-action@v1
with:
version: ${{ env.KIND_VERSION }}
cluster_name: kind
- name: Show Kubernetes version
run: |
kubectl version
- name: Install Helm chart and run Helm tests
run: |
release_name=$(yq .name $CHART_DIRECTORY/Chart.yaml)
kubectl create ns operator-system
helm -n operator-system upgrade -i $release_name --wait --timeout 5m $CHART_DIRECTORY
helm -n operator-system test $release_name