-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (82 loc) · 2.69 KB
/
helm_lint_test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Lint, Test, Install Charts
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
lint-test:
name: "Lint and Test Helm Charts"
runs-on:
labels: helm-charts-runner
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.14.4
- uses: actions/setup-python@v4
with:
python-version: '3.11.8'
check-latest: true
- name: Set up chart-testing
uses: helm/[email protected]
- name: Lint
id: lint-charts
run: |
ct lint \
--target-branch ${{ github.event.repository.default_branch }} \
--validate-maintainers=false \
--check-version-increment=false
- name: Setup helm unittest
id: setup-helm-unittest
run: helm plugin install https://github.com/helm-unittest/helm-unittest
- name: Run Unit Test
id: unit-test-charts
run: |
helm unittest ./charts/llamacloud
install-test:
name: "Install Helm Charts"
needs: [lint-test]
runs-on:
labels: helm-charts-runner
strategy:
matrix:
k8s-version:
# Limit testing because tests can take a while to run
# Ref: https://hub.docker.com/r/kindest/node/tags
- v1.28.13
- v1.30.4
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8s-version }}
- name: Set up chart-testing
uses: helm/[email protected]
- name: Test
id: test-charts
env:
LLAMACLOUD_LICENSE_KEY: ${{ secrets.LLAMACLOUD_LICENSE_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OIDC_DISCOVERY_URL: ${{ secrets.OIDC_DISCOVERY_URL }}
OIDC_CLIENT_ID: ${{ secrets.OIDC_CLIENT_ID }}
OIDC_CLIENT_SECRET: ${{ secrets.OIDC_CLIENT_SECRET }}
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} \
--helm-extra-set-args \
"--set=global.config.licenseKey=$LLAMACLOUD_LICENSE_KEY \
--set=backend.config.oidc.discoveryUrl=$OIDC_DISCOVERY_URL \
--set=backend.config.oidc.clientId=$OIDC_CLIENT_ID \
--set=backend.config.oidc.clientSecret=$OIDC_CLIENT_SECRET \
--set=backend.config.openAiApiKey=$OPENAI_API_KEY \
--set=llamaParse.config.openAiApiKey=$OPENAI_API_KEY \
--timeout 900s"