-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Merging dev image build with int test Refs: #13
- Loading branch information
Showing
2 changed files
with
63 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,71 @@ | ||
name: Integration test | ||
name: Dev Image Build and Integration test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: "ghcr.io/amikos-tech/chromadb-chart/chroma" | ||
LATEST_VERSION: "0.4.9" | ||
jobs: | ||
release: | ||
build-images: | ||
strategy: | ||
matrix: | ||
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9 ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
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 | ||
strategy: | ||
matrix: | ||
kubernetes-version: [1.23.0, v1.28.0-rc.0 ] | ||
chroma-version: [ 0.4.3, 0.4.9 ] | ||
kubernetes-version: [1.23.0, 1.24.0, 1.27.3, v1.28.0-rc.0 ] | ||
chroma-version: [ 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9 ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
|
@@ -31,24 +83,19 @@ jobs: | |
uses: medyagh/setup-minikube@latest | ||
with: | ||
kubernetes-version: ${{ matrix.kubernetes-version }} | ||
# - name: Add helm repo | ||
# run: | | ||
# set -e | ||
# helm repo add chromadb https://amikos-tech.github.io/chromadb-chart/ | ||
# helm repo update | ||
- name: Install chromadb | ||
run: | | ||
set -e | ||
helm install chromadb ./charts/chromadb-chart --set chromadb.isPersistent=true \ | ||
--set chromadb.allowReset=true \ | ||
--set chromadb.chromaVersion=${{ matrix.chroma-version }} | ||
--set chromadb.chromaVersion=${{ matrix.chroma-version }}-dev | ||
- name: Wait for deployment to be ready | ||
run: | | ||
sleep 120 | ||
echo "Deployment not ready" | ||
kubectl get pods | ||
kubectl get events | ||
kubectl logs -l app.kubernetes.io/name=chromadb | ||
set -e | ||
kubectl wait \ | ||
--for=condition=ready pod \ | ||
--selector=app.kubernetes.io/name=chromadb \ | ||
--timeout=120s | ||
- name: Hearthbeat | ||
run: | | ||
set -e | ||
|