-
Notifications
You must be signed in to change notification settings - Fork 22
200 lines (196 loc) · 6.24 KB
/
integration-test.yml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: Dev Image Build and Integration test
on:
push:
branches:
- main
paths:
- charts/**
- image/**
- tests/**
pull_request_target:
branches:
- main
paths:
- charts/**
- image/**
- tests/**
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma"
LATEST_VERSION: "0.5.23"
jobs:
# build-images:
# strategy:
# matrix:
# chroma-version:
# [
# 0.4.9,
# 0.4.10, #pre-flight checks introduced
# 0.4.16, #multi-tenancy introduced
# 0.4.24,
# 0.5.5,
# ]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Log in to the Container registry
# uses: docker/login-action@v2.1.0
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: ${{ env.IMAGE_NAME }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Build and push release Docker image
# uses: docker/build-push-action@v3.2.0
# if: ${{ env.LATEST_VERSION == matrix.chroma-version }}
# with:
# context: .
# file: image/Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# build-args: |
# CHROMA_VERSION=${{ matrix.chroma-version }}
# tags: "${{ env.IMAGE_NAME }}:${{ matrix.chroma-version }}-dev,${{ env.IMAGE_NAME }}:canary"
# - name: Build and push release Docker image
# uses: docker/build-push-action@v3.2.0
# if: ${{ env.LATEST_VERSION != matrix.chroma-version }}
# with:
# context: .
# file: image/Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# labels: ${{ steps.meta.outputs.labels }}
# build-args: |
# CHROMA_VERSION=${{ matrix.chroma-version }}
# tags: "${{ env.IMAGE_NAME }}:${{ matrix.chroma-version }}-dev"
# build-images:
# strategy:
# matrix:
# chroma-version:
# [
# 0.4.9,
# 0.4.10, #pre-flight checks introduced
# 0.4.16, #multi-tenancy introduced
# 0.4.24,
# 0.5.5,
# ]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Log in to the Container registry
# uses: docker/login-action@v2.1.0
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: ${{ env.IMAGE_NAME }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Build and push release Docker image
# uses: docker/build-push-action@v3.2.0
# if: ${{ env.LATEST_VERSION == matrix.chroma-version }}
# with:
# context: .
# file: image/Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# build-args: |
# CHROMA_VERSION=${{ matrix.chroma-version }}
# tags: "${{ env.IMAGE_NAME }}:${{ matrix.chroma-version }}-dev,${{ env.IMAGE_NAME }}:canary"
# - name: Build and push release Docker image
# uses: docker/build-push-action@v3.2.0
# if: ${{ env.LATEST_VERSION != matrix.chroma-version }}
# with:
# context: .
# file: image/Dockerfile
# push: true
# platforms: linux/amd64,linux/arm64
# labels: ${{ steps.meta.outputs.labels }}
# build-args: |
# CHROMA_VERSION=${{ matrix.chroma-version }}
# tags: "${{ env.IMAGE_NAME }}:${{ matrix.chroma-version }}-dev"
integration-test:
# needs: build-images
# needs: build-images
strategy:
matrix:
kubernetes-version: [1.23.0, 1.31.0]
chroma-version:
[
0.4.9,
0.4.24,
0.5.23,
]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v4.2.0
- name: start minikube
id: minikube
uses: medyagh/setup-minikube@latest
with:
kubernetes-version: ${{ matrix.kubernetes-version }}
# - name: Build image from Dockerfile
# run: |
# eval $(minikube docker-env)
# docker build -t ghcr.io/amikos-tech/chromadb-chart/chroma:${{ matrix.chroma-version }} --build-arg CHROMA_VERSION=${{ matrix.chroma-version }} -f image/Dockerfile .
# - name: Build image from Dockerfile
# run: |
# eval $(minikube docker-env)
# docker build -t ghcr.io/amikos-tech/chromadb-chart/chroma:${{ matrix.chroma-version }} --build-arg CHROMA_VERSION=${{ matrix.chroma-version }} -f image/Dockerfile .
- name: Install chromadb
run: |
set -e
sleep 20
helm install chromadb ./charts/chromadb-chart \
--set chromadb.isPersistent=true \
--set chromadb.allowReset=true \
--set chromadb.apiVersion=${{ matrix.chroma-version }}
- name: Wait for deployment to be ready
run: |
kubectl wait \
--for=condition=ready pod \
--selector=app.kubernetes.io/name=chromadb \
--timeout=120s
- name: Test
run: |
set -e
kubectl get pods -A
kubectl get svc -A
helm test chromadb
- name: Debug
if: failure()
run: |
kubectl get pods -A
kubectl get svc -A
kubectl logs --selector=app.kubernetes.io/name=chromadb --previous
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true