You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by ti...@apache.org on 2022/10/23 03:34:18 UTC

[incubator-kvrocks] branch unstable updated: ci: tidy lint job (#1027)

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

tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new c918ced1 ci: tidy lint job (#1027)
c918ced1 is described below

commit c918ced1ef380fdb1528ad083aa35d492943632d
Author: tison <wa...@gmail.com>
AuthorDate: Sun Oct 23 11:34:13 2022 +0800

    ci: tidy lint job (#1027)
    
    Signed-off-by: tison <wa...@gmail.com>
---
 .github/workflows/kvrocks.yaml | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/kvrocks.yaml b/.github/workflows/kvrocks.yaml
index 0efff313..a634dc46 100644
--- a/.github/workflows/kvrocks.yaml
+++ b/.github/workflows/kvrocks.yaml
@@ -40,20 +40,25 @@ jobs:
     name: Lint and check code
     runs-on: ubuntu-20.04
     steps:
-      - name: Checkout Code Base
-        uses: actions/checkout@v3
-      - name: Install Check Tools
+      - uses: actions/checkout@v3
+      - uses: actions/setup-go@v3
+        with:
+          go-version-file: 'tests/gocase/go.mod'
+      - name: Prepare Dependencies
         run: |
           sudo apt update
           sudo apt install -y clang-format-12 clang-tidy-12
-      - name: Setup Go
-        uses: actions/setup-go@v3
-        with:
-          go-version: 1.19.x
-      - name: Check code format
+      - name: Check with clang-format
         id: check-format
         run: ./x.py check format --clang-format-path clang-format-12
-      - name: Format code
+      - name: Check with clang-tidy
+        run: |
+          ./x.py build --skip-build
+          ./x.py check tidy -j $(nproc) --clang-tidy-path clang-tidy-12 --run-clang-tidy-path run-clang-tidy-12
+      - name: Lint with golangci-lint
+        run: ./x.py check golangci-lint
+
+      - name: Prepare format patch
         if: always() && steps.check-format.outcome != 'success'
         run: |
           ./x.py format --clang-format-path clang-format-12
@@ -64,12 +69,6 @@ jobs:
         if: always() && steps.check-format.outcome != 'success'
         with:
           path: clang-format.patch
-      - name: Lint gocase code
-        run: ./x.py check golangci-lint
-      - name: Check cpp code via clang-tidy
-        run: |
-          ./x.py build --skip-build
-          ./x.py check tidy -j $(nproc) --clang-tidy-path clang-tidy-12 --run-clang-tidy-path run-clang-tidy-12
 
   build-and-test:
     name: Build and test