Skip to content

Nightly CI

Nightly CI #765

Workflow file for this run

name: Nightly CI
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 18 * * *'
jobs:
nightly-master:
name: Run Nightly CI(master)
runs-on: ubuntu-latest
timeout-minutes: 90
env:
IMAGE_REPO: "milvusdb/milvus"
TAG_PREFIX: "master-"
RELEASE_NAME: "go-test"
IMAGE_TAG: "master-latest"
QA_NAMESPACE: "qa"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
id: extracter
working-directory: ci/scripts
run: |
url="https://registry.hub.docker.com/v2/repositories/$IMAGE_REPO/tags?page=1&name=$TAG_PREFIX"
echo "IMAGE_TAG=$(curl -s $url | jq --arg TAG_PREFIX "$TAG_PREFIX" -r '."results"[] | select(.images[].architecture == "amd64" and (.name | contains("gpu") | not) and (.name | startswith($TAG_PREFIX))) | .name' | head -n 1)" >> $GITHUB_ENV
# echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
# echo "::set-output name=tag::$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/milvus-dev -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)"
- name: Create cluster
uses: helm/[email protected]
- name: Deploy milvus operator
shell: bash
run: |
kubectl get sc
helm install milvus-operator -n milvus-operator --create-namespace https://github.com/milvus-io/milvus-operator/releases/download/v0.6.9/milvus-operator-0.6.9.tgz
kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator
kubectl get pods -n milvus-operator
- name: Install Milvus
shell: bash
working-directory: "ci/milvus-operator"
run: |
echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME"
kubectl create namespace ${QA_NAMESPACE}
envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE}
kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m
kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE}
kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE}
kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}"
kubectl get svc -n ${QA_NAMESPACE}
kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s
- name: Run Ci Test
shell: bash
working-directory: test/
run: |
nc -vz 127.0.0.1 19530
curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.8.2/gotestsum_1.8.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m
nightly-v2_3_x:
name: Run Nightly CI(v2.3.x)
runs-on: ubuntu-latest
timeout-minutes: 90
env:
IMAGE_REPO: "milvusdb/milvus"
TAG_PREFIX: "2.3-"
RELEASE_NAME: "go-test"
IMAGE_TAG: "2.3-latest"
QA_NAMESPACE: "qa"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: "v2.3.x"
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
id: extracter
working-directory: ci/scripts
run: |
url="https://registry.hub.docker.com/v2/repositories/$IMAGE_REPO/tags?page=1&name=$TAG_PREFIX"
echo "IMAGE_TAG=$(curl -s $url | jq --arg TAG_PREFIX "$TAG_PREFIX" -r '."results"[] | select(.images[].architecture == "amd64" and (.name | contains("gpu") | not) and (.name | startswith($TAG_PREFIX))) | .name' | head -n 1)" >> $GITHUB_ENV
# echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
# echo "::set-output name=tag::$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/milvus-dev -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)"
- name: Create cluster
uses: helm/[email protected]
- name: Deploy milvus operator
shell: bash
run: |
kubectl get sc
helm install milvus-operator -n milvus-operator --create-namespace https://github.com/milvus-io/milvus-operator/releases/download/v0.6.9/milvus-operator-0.6.9.tgz
kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator
kubectl get pods -n milvus-operator
- name: Install Milvus
shell: bash
working-directory: "ci/milvus-operator"
run: |
echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME"
kubectl create namespace ${QA_NAMESPACE}
envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE}
kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m
kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE}
kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE}
kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}"
kubectl get svc -n ${QA_NAMESPACE}
kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s
- name: Run Ci Test
shell: bash
working-directory: test/
run: |
nc -vz 127.0.0.1 19530
curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.8.2/gotestsum_1.8.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m
nightly-v2_4_x:
name: Run Nightly CI(v2.4.x)
runs-on: ubuntu-latest
timeout-minutes: 90
env:
IMAGE_REPO: "milvusdb/milvus"
TAG_PREFIX: "2.4-"
RELEASE_NAME: "go-test"
IMAGE_TAG: "2.4-latest"
QA_NAMESPACE: "qa"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: "master"
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
id: extracter
working-directory: ci/scripts
run: |
url="https://registry.hub.docker.com/v2/repositories/$IMAGE_REPO/tags?page=1&name=$TAG_PREFIX"
echo "IMAGE_TAG=$(curl -s $url | jq --arg TAG_PREFIX "$TAG_PREFIX" -r '."results"[] | select(.images[].architecture == "amd64" and (.name | contains("gpu") | not) and (.name | startswith($TAG_PREFIX))) | .name' | head -n 1)" >> $GITHUB_ENV
# echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
# echo "::set-output name=tag::$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/milvus-dev -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)"
- name: Create cluster
uses: helm/[email protected]
- name: Deploy milvus operator
shell: bash
run: |
kubectl get sc
helm install milvus-operator -n milvus-operator --create-namespace https://github.com/milvus-io/milvus-operator/releases/download/v0.6.9/milvus-operator-0.6.9.tgz
kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator
kubectl get pods -n milvus-operator
- name: Install Milvus
shell: bash
working-directory: "ci/milvus-operator"
run: |
echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME"
kubectl create namespace ${QA_NAMESPACE}
envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE}
kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m
kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE}
kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE}
kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}"
kubectl get svc -n ${QA_NAMESPACE}
kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s
- name: Run Ci Test
shell: bash
working-directory: test/
run: |
nc -vz 127.0.0.1 19530
curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.8.2/gotestsum_1.8.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum
gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m