|
| 1 | +name: E2E Backend Integration Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + e2e-backend: |
| 12 | + runs-on: ubuntu-latest-16-cores |
| 13 | + timeout-minutes: 20 |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Checkout repository |
| 17 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 |
| 18 | + |
| 19 | + - name: Setup Go |
| 20 | + uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v5 |
| 21 | + with: |
| 22 | + go-version: "1.25" |
| 23 | + cache-dependency-path: controller/go.sum |
| 24 | + |
| 25 | + - name: Setup Bun |
| 26 | + uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2 |
| 27 | + with: |
| 28 | + bun-version: latest |
| 29 | + |
| 30 | + - name: Setup Kind |
| 31 | + run: | |
| 32 | + go install sigs.k8s.io/kind@latest |
| 33 | + kind create cluster --name kubeairunway-backend-e2e --wait 120s |
| 34 | +
|
| 35 | + - name: Install KAITO operator |
| 36 | + run: | |
| 37 | + helm repo add kaito https://kaito-project.github.io/kaito/charts/kaito |
| 38 | + helm install kaito-workspace kaito/workspace \ |
| 39 | + --namespace kaito-workspace \ |
| 40 | + --create-namespace \ |
| 41 | + --set featureGates.disableNodeAutoProvisioning=true |
| 42 | + kubectl wait --for=condition=Available deployment -n kaito-workspace -l app.kubernetes.io/name=workspace --timeout=120s |
| 43 | +
|
| 44 | + - name: Build and deploy controller |
| 45 | + run: | |
| 46 | + make controller-docker-build CONTROLLER_IMG=kubeairunway-controller:e2e |
| 47 | + kind load docker-image kubeairunway-controller:e2e --name kubeairunway-backend-e2e |
| 48 | + make controller-deploy CONTROLLER_IMG=kubeairunway-controller:e2e |
| 49 | + kubectl wait --for=condition=Available deployment -n kubeairunway-system -l control-plane=controller-manager --timeout=120s |
| 50 | +
|
| 51 | + - name: Build and deploy KAITO provider |
| 52 | + run: | |
| 53 | + make kaito-provider-docker-build KAITO_PROVIDER_IMG=kaito-provider:e2e |
| 54 | + kind load docker-image kaito-provider:e2e --name kubeairunway-backend-e2e |
| 55 | + make kaito-provider-deploy KAITO_PROVIDER_IMG=kaito-provider:e2e |
| 56 | + kubectl wait --for=condition=Available deployment -n kubeairunway-system -l control-plane=kaito-provider --timeout=120s |
| 57 | +
|
| 58 | + - name: Wait for provider registration |
| 59 | + run: | |
| 60 | + kubectl wait --for=jsonpath='{.status.ready}'=true inferenceproviderconfig/kaito --timeout=120s |
| 61 | +
|
| 62 | + - name: Install dependencies |
| 63 | + run: bun ci |
| 64 | + |
| 65 | + - name: Run backend integration tests |
| 66 | + run: | |
| 67 | + cd backend |
| 68 | + bun test |
| 69 | +
|
| 70 | + - name: Collect debug info |
| 71 | + if: failure() |
| 72 | + run: | |
| 73 | + echo "=== InferenceProviderConfigs ===" |
| 74 | + kubectl get inferenceproviderconfigs -o yaml |
| 75 | + echo "=== Controller Logs ===" |
| 76 | + kubectl logs -n kubeairunway-system -l control-plane=controller-manager --tail=100 |
| 77 | + echo "=== KAITO Provider Logs ===" |
| 78 | + kubectl logs -n kubeairunway-system -l control-plane=kaito-provider --tail=100 |
| 79 | + echo "=== Pods ===" |
| 80 | + kubectl get pods -A |
| 81 | +
|
| 82 | + - name: Cleanup |
| 83 | + if: always() |
| 84 | + run: | |
| 85 | + kind delete cluster --name kubeairunway-backend-e2e |
0 commit comments