Merge branch 'main' into e2e_reorg #7
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
name: kaito-e2e-workflow | ||
on: | ||
workflow_call: | ||
inputs: | ||
git_sha: | ||
type: string | ||
required: true | ||
node_provisioner: | ||
type: string | ||
required: false | ||
default: gpuprovisioner | ||
tag: | ||
type: string | ||
isRelease: | ||
type: boolean | ||
default: false | ||
registry: | ||
type: string | ||
region: | ||
type: string | ||
description: "the azure location to run the e2e test in" | ||
default: "eastus" | ||
k8s_version: | ||
type: string | ||
default: "1.30.0" | ||
jobs: | ||
base-setup: | ||
uses: ./.github/workflows/e2e-base-setup.yaml | ||
with: | ||
git_sha: ${{ inputs.git_sha }} | ||
node_provisioner: ${{ inputs.node_provisioner }} | ||
tag: ${{ inputs.tag }} | ||
isRelease: ${{ inputs.isRelease }} | ||
registry: ${{ inputs.registry }} | ||
region: ${{ inputs.region }} | ||
k8s_version: ${{ inputs.k8s_version }} | ||
e2e-tests: | ||
runs-on: [ "self-hosted", "hostname:kaito-e2e-github-runner" ] | ||
name: e2e-tests-${{ inputs.node_provisioner }} | ||
needs: [ base-setup ] | ||
permissions: | ||
contents: read | ||
id-token: write | ||
env: | ||
AZURE_CLUSTER_NAME: ${{ needs.base-setup.outputs.cluster_name }} | ||
RUN_LLAMA_13B: ${{ needs.base-setup.outputs.run_llama_13b }} | ||
REGISTRY: ${{ needs.base-setup.outputs.registry }} | ||
TEST_SUITE: ${{ inputs.node_provisioner }} | ||
E2E_ACR_REGISTRY: ${{ needs.base-setup.outputs.cluster_name }}.azurecr.io | ||
E2E_ACR_REGISTRY_SECRET: ${{ needs.base-setup.outputs.cluster_name }}-acr-secret | ||
steps: | ||
- name: Set up Go ${{ env.GO_VERSION }} | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Log ${{ inputs.node_provisioner }} | ||
run: | | ||
if [ "${{ inputs.node_provisioner }}" == "gpuprovisioner" ]; then | ||
kubectl logs -n gpu-provisioner -l app.kubernetes.io/name=gpu-provisioner -c controller | ||
else | ||
kubectl logs -n karpenter -l app.kubernetes.io/name=karpenter -c controller | ||
fi | ||
- name: Log kaito-workspace | ||
run: | | ||
kubectl get pods -n kaito-workspace -o name | grep "^pod/kaito-workspace" | sed 's/^pod\///' | xargs -I {} kubectl logs -n kaito-workspace {} | ||
- name: Run e2e test | ||
run: | | ||
AI_MODELS_REGISTRY="${E2E_ACR_AMRT_USERNAME}".azurecr.io \ | ||
AI_MODELS_REGISTRY_SECRET="${E2E_AMRT_SECRET_NAME}" \ | ||
make kaito-workspace-e2e-test | ||
- name: Cleanup e2e resources | ||
if: ${{ always() }} | ||
uses: azure/[email protected] | ||
with: | ||
inlineScript: | | ||
set +e | ||
az group delete --name "${AZURE_CLUSTER_NAME}" --yes --no-wait || true |