Browse Source

Update readme

tumao 3 years ago
parent
commit
276bf708b3
3 changed files with 53 additions and 52 deletions
  1. 51 51
      .github/workflows/dev.yml
  2. 1 1
      README.md
  3. 1 0
      express/src/__tests__/crons/crons.service.test.ts

+ 51 - 51
.github/workflows/dev.yml

@@ -2,7 +2,7 @@ name: Milvus insight dev release
 
 
 on:
 on:
   pull_request_target:
   pull_request_target:
-    branches: [dev]
+    branches: [main]
     types: [closed]
     types: [closed]
 
 
 jobs:
 jobs:
@@ -16,7 +16,7 @@ jobs:
         with:
         with:
           node-version: 12
           node-version: 12
 
 
-      - name: Run express tests
+      - name: Run Express tests
         run: |
         run: |
           cd express
           cd express
           yarn install
           yarn install
@@ -42,57 +42,57 @@ jobs:
       - name: Docker Push Dev
       - name: Docker Push Dev
         run: docker push tumao/milvus-insight:dev
         run: docker push tumao/milvus-insight:dev
 
 
-  # k8s:
-  #   runs-on: ubuntu-latest
-  #   needs: build
-  #   steps:
-  #     - uses: actions/checkout@v2
-  #     - name: Setup Node.js
-  #       uses: actions/setup-node@v1
-  #       with:
-  #         node-version: 12
+  k8s:
+    runs-on: ubuntu-latest
+    needs: build
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup Node.js
+        uses: actions/setup-node@v1
+        with:
+          node-version: 12
 
 
-  #     - name: Install OpenVPN and kubectl
-  #       run: |
-  #         sudo apt-get update
-  #         sudo apt-get install openvpn -y
-  #         sudo apt-get install -y apt-transport-https ca-certificates curl
-  #         sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
-  #         echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
-  #         sudo apt-get update
-  #         sudo apt-get install kubectl -y
+      - name: Install OpenVPN and kubectl
+        run: |
+          sudo apt-get update
+          sudo apt-get install openvpn -y
+          sudo apt-get install -y apt-transport-https ca-certificates curl
+          sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
+          echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
+          sudo apt-get update
+          sudo apt-get install kubectl -y
 
 
-  #     - name: Connect VPN
-  #       uses: golfzaptw/action-connect-ovpn@master
-  #       id: connect_vpn
-  #       with:
-  #         FILE_OVPN: '.github/workflows/client.ovpn'
-  #       env:
-  #         CA_CRT: ${{ secrets.VPN_CA}}
-  #         USER_CRT: ${{ secrets.VPN_CRT }}
-  #         USER_KEY: ${{ secrets.VPN_KEY }}
+      - name: Connect VPN
+        uses: golfzaptw/action-connect-ovpn@master
+        id: connect_vpn
+        with:
+          FILE_OVPN: '.github/workflows/client.ovpn'
+        env:
+          CA_CRT: ${{ secrets.VPN_CA}}
+          USER_CRT: ${{ secrets.VPN_CRT }}
+          USER_KEY: ${{ secrets.VPN_KEY }}
 
 
-  #     - name: Deploy to cluster
-  #       run: |
-  #         echo ${{ secrets.kubeconfig }} > config64
-  #         base64 -d config64 > kubeconfig
-  #         kubectl delete pods -n ued -l app=milvus-insight --kubeconfig=kubeconfig
-  #         sleep 60
+      - name: Deploy to cluster
+        run: |
+          echo ${{ secrets.kubeconfig }} > config64
+          base64 -d config64 > kubeconfig
+          kubectl delete pods -n ued -l app=milvus-insight --kubeconfig=kubeconfig
+          sleep 60
 
 
-  # check:
-    # runs-on: ubuntu-latest
-    # needs: [build, k8s]
-    # steps:
-    #   - uses: actions/checkout@v2
-    #   - name: Setup Node.js
-    #     uses: actions/setup-node@v1
-    #     with:
-    #       node-version: 12
+  check:
+  runs-on: ubuntu-latest
+  needs: [build, k8s]
+  steps:
+    - uses: actions/checkout@v2
+    - name: Setup Node.js
+      uses: actions/setup-node@v1
+      with:
+        node-version: 12
 
 
-    #   - name: Check insight status
-    #     env:
-    #       INSIGHT_URL: ${{ secrets.INSIGHT_URL }}
-    #     run: |
-    #       yarn add axios
-    #       yarn add @actions/core
-    #       node checkInsight.js
+    - name: Check insight status
+      env:
+        INSIGHT_URL: ${{ secrets.INSIGHT_URL }}
+      run: |
+        yarn add axios
+        yarn add @actions/core
+        node checkInsight.js

+ 1 - 1
README.md

@@ -1,7 +1,7 @@
 # Milvus insight
 # Milvus insight
+
 [![typescript](https://badges.aleen42.com/src/typescript.svg)](https://badges.aleen42.com/src/typescript.svg)
 [![typescript](https://badges.aleen42.com/src/typescript.svg)](https://badges.aleen42.com/src/typescript.svg)
 [![downloads](https://img.shields.io/docker/pulls/milvusdb/milvus-insight)](https://img.shields.io/docker/pulls/milvusdb/milvus-insight)
 [![downloads](https://img.shields.io/docker/pulls/milvusdb/milvus-insight)](https://img.shields.io/docker/pulls/milvusdb/milvus-insight)
-[![codecov](https://codecov.io/gh/Tumao727/milvus-insight/branch/dev/graph/badge.svg?token=qB4H3VIHEJ)](https://codecov.io/gh/Tumao727/milvus-insight)
 
 
 Milvus insight provides an intuitive and efficient GUI for Milvus, allowing you to interact with your databases and manage your data with just few clicks.
 Milvus insight provides an intuitive and efficient GUI for Milvus, allowing you to interact with your databases and manage your data with just few clicks.
 
 

+ 1 - 0
express/src/__tests__/crons/crons.service.test.ts

@@ -157,5 +157,6 @@ describe('test crons service', () => {
 
 
     await newCronsService.getCollections(WS_EVENTS.COLLECTION);
     await newCronsService.getCollections(WS_EVENTS.COLLECTION);
     expect(schedule).toBeCalledWith(mockCronEverySec, expect.any(Function));
     expect(schedule).toBeCalledWith(mockCronEverySec, expect.any(Function));
+    expect(handleEndTask).toBeCalled();
   });
   });
 });
 });