github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/.github/workflows/nightly_ci.yml (about)

     1  name: Nightly CI
     2  on:
     3    workflow_dispatch:
     4  
     5    schedule:
     6      # * is a special character in YAML so you have to quote this string
     7      #         ┌───────────── minute (0 - 59)
     8      #         │ ┌───────────── hour (0 - 23)
     9      #         │ │ ┌───────────── day of the month (1 - 31)
    10      #         │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
    11      #         │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
    12      #         │ │ │ │ │
    13      #         │ │ │ │ │
    14      #         │ │ │ │ │
    15      - cron:  '0 18 * * *'
    16  
    17  jobs:
    18    nightly-master:
    19      name: Run Nightly CI(master)
    20      runs-on: ubuntu-latest
    21      timeout-minutes: 90
    22      env:
    23        IMAGE_REPO: "milvusdb/milvus"
    24        TAG_PREFIX: "master-"
    25        RELEASE_NAME: "go-test"
    26        IMAGE_TAG: "master-latest"
    27        QA_NAMESPACE: "qa"
    28      steps:
    29      - name: Checkout code
    30        uses: actions/checkout@v3
    31        with:
    32          fetch-depth: '0'
    33  
    34      - name: Get the latest of Milvus dev image tag
    35        shell: bash
    36        id: extracter
    37        working-directory: ci/scripts
    38        run: |
    39          url="https://registry.hub.docker.com/v2/repositories/$IMAGE_REPO/tags?page=1&name=$TAG_PREFIX"
    40          echo "IMAGE_TAG=$(curl -s $url | jq -r '."results"[]["name"] | select(test("amd64$"))' | head -n 1)" >> $GITHUB_ENV
    41  #        echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
    42          # 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)"
    43  
    44      - name: Create cluster
    45        uses: helm/kind-action@v1.3.0
    46  
    47      - name: Deploy milvus operator
    48        shell: bash
    49        run: |
    50          kubectl get sc
    51          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
    52          kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator
    53          kubectl get pods -n milvus-operator
    54  
    55      - name: Install Milvus
    56        shell: bash
    57        working-directory: "ci/milvus-operator"
    58        run: |
    59            echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME"
    60            kubectl create namespace ${QA_NAMESPACE}
    61            envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE}
    62            kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m
    63            kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE}
    64            kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE}
    65            kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}"
    66            kubectl get svc -n ${QA_NAMESPACE}
    67            kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s
    68  
    69      - name: Run Ci Test
    70        shell: bash
    71        working-directory: test/
    72        run: |
    73          nc -vz 127.0.0.1 19530
    74          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
    75          gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m
    76    
    77    nightly-v2_3_x:
    78      name: Run Nightly CI(v2.3.x)
    79      runs-on: ubuntu-latest
    80      timeout-minutes: 90
    81      env:
    82        IMAGE_REPO: "milvusdb/milvus"
    83        TAG_PREFIX: "2.3-"
    84        RELEASE_NAME: "go-test"
    85        IMAGE_TAG: "2.3-latest"
    86        QA_NAMESPACE: "qa"
    87      steps:
    88      - name: Checkout code
    89        uses: actions/checkout@v3
    90        with:
    91          ref: "v2.3.x"
    92          fetch-depth: '0'
    93  
    94      - name: Get the latest of Milvus dev image tag
    95        shell: bash
    96        id: extracter
    97        working-directory: ci/scripts
    98        run: |
    99          url="https://registry.hub.docker.com/v2/repositories/$IMAGE_REPO/tags?page=1&name=$TAG_PREFIX"
   100          echo "IMAGE_TAG=$(curl -s $url | jq -r '."results"[]["name"] | select(test("amd64$"))' | head -n 1)" >> $GITHUB_ENV
   101  #        echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
   102          # 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)"
   103  
   104      - name: Create cluster
   105        uses: helm/kind-action@v1.3.0
   106  
   107      - name: Deploy milvus operator
   108        shell: bash
   109        run: |
   110          kubectl get sc
   111          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
   112          kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator
   113          kubectl get pods -n milvus-operator
   114  
   115      - name: Install Milvus
   116        shell: bash
   117        working-directory: "ci/milvus-operator"
   118        run: |
   119            echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME"
   120            kubectl create namespace ${QA_NAMESPACE}
   121            envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE}
   122            kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m
   123            kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE}
   124            kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE}
   125            kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}"
   126            kubectl get svc -n ${QA_NAMESPACE}
   127            kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s
   128  
   129      - name: Run Ci Test
   130        shell: bash
   131        working-directory: test/
   132        run: |
   133          nc -vz 127.0.0.1 19530
   134          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
   135          gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m 
   136  
   137    nightly-v2_2_x:
   138      name: Run Nightly CI(v2.2.x)
   139      runs-on: ubuntu-latest
   140      timeout-minutes: 90
   141      env:
   142        IMAGE_REPO: "milvusdb/milvus"
   143        TAG_PREFIX: "2.2.0-"
   144        RELEASE_NAME: "go-test"
   145        IMAGE_TAG: "2.2.0-latest"
   146        QA_NAMESPACE: "qa"
   147      steps:
   148      - name: Checkout code
   149        uses: actions/checkout@v3
   150        with:
   151          ref: "v2.2.x"
   152          fetch-depth: '0'
   153  
   154      - name: Get the latest of Milvus dev image tag
   155        shell: bash
   156        id: extracter
   157        working-directory: ci/scripts
   158        run: |
   159          url="https://registry.hub.docker.com/v2/repositories/$IMAGE_REPO/tags?page=1&name=$TAG_PREFIX"
   160          echo "IMAGE_TAG=$(curl -s $url | jq -r '."results"[]["name"] | select(test("amd64$"))' | head -n 1)" >> $GITHUB_ENV
   161  #        echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
   162          # 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)"
   163  
   164      - name: Create cluster
   165        uses: helm/kind-action@v1.3.0
   166  
   167      - name: Deploy milvus operator
   168        shell: bash
   169        run: |
   170          kubectl get sc
   171          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
   172          kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator
   173          kubectl get pods -n milvus-operator
   174  
   175      - name: Install Milvus
   176        shell: bash
   177        working-directory: "ci/milvus-operator"
   178        run: |
   179            echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME"
   180            kubectl create namespace ${QA_NAMESPACE}
   181            envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE}
   182            kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m
   183            kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE}
   184            kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE}
   185            kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}"
   186            kubectl get svc -n ${QA_NAMESPACE}
   187            kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s
   188  
   189      - name: Run Ci Test
   190        shell: bash
   191        working-directory: test/
   192        run: |
   193          nc -vz 127.0.0.1 19530
   194          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
   195          gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m