Skip to content

ci: add ut and e2e test #6

ci: add ut and e2e test

ci: add ut and e2e test #6

Workflow file for this run

name: Run E2E test
on:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]
jobs:
setup-kind-helm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build binaries
run: |
make release
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Image
run: |
docker build -t model-csi-driver:latest -f misc/Dockerfile .
- name: Install Kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Create Kind Cluster
run: |
kind create cluster --wait 120s
- name: Load docker image into kind
run: |
kind load docker-image my-app:latest
- name: Install Helm
run: |
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Check cluster and helm
run: |
kubectl get nodes
kubectl cluster-info
helm version
- name: Deploy model-csi-driver chart
run: |
helm upgrade --install model-csi-driver ./charts/model-csi-driver --namespace model-csi --create-namespace
- name: Wait for model-csi-driver pods to be ready
run: |
kubectl wait --for=condition=Ready pods --all --namespace model-csi --timeout=60s