You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by su...@apache.org on 2022/10/07 16:12:39 UTC

[shardingsphere-on-cloud] branch main updated: chore(ci): add unit test workflow in Github Action (#83)

This is an automated email from the ASF dual-hosted git repository.

sunnianjun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git


The following commit(s) were added to refs/heads/main by this push:
     new 2f348ea  chore(ci): add unit test workflow in Github Action (#83)
2f348ea is described below

commit 2f348ea1208b3396ddbe873a60f32369578f8697
Author: liyao <ma...@126.com>
AuthorDate: Sat Oct 8 00:12:34 2022 +0800

    chore(ci): add unit test workflow in Github Action (#83)
    
    * chore(ci): add unit test workflow
    
    Signed-off-by: mlycore <ma...@126.com>
    
    * fix(ci): update setup go action
    
    Signed-off-by: mlycore <ma...@126.com>
    
    * fix: update unit test command
    
    Signed-off-by: mlycore <ma...@126.com>
---
 .github/workflows/unit-test.yml | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
new file mode 100644
index 0000000..e0a7806
--- /dev/null
+++ b/.github/workflows/unit-test.yml
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Unit Test 
+
+on:
+  pull_request
+
+jobs:
+  operator:
+    runs-on: ubuntu-latest
+    steps:
+      - name: "checkout codes"
+        uses: actions/checkout@v2
+      - name: "setup go"
+        uses: actions/setup-go@v3
+        with:
+          go-version: '^1.18.1'
+      - name: "unit test"
+        run: |
+          cd shardingsphere-operator/pkg/reconcile
+          go test --count=1 -race -coverprofile=coverage.txt -covermode=atomic -v ./...
\ No newline at end of file