瀏覽代碼

ci: enable format workflow on master (#3623)

LostNeophyte 2 年之前
父節點
當前提交
277079ff45
共有 2 個文件被更改,包括 7 次插入7 次删除
  1. 6 6
      .github/workflows/format.yaml
  2. 1 1
      lua/lvim/core/cmp.lua

+ 6 - 6
.github/workflows/format.yaml

@@ -3,7 +3,7 @@ name: format
 on:
   pull_request:
     branches:
-      - "rolling"
+      - "master"
     paths:
       - 'lua/**'
       - 'snapshots/**'
@@ -18,11 +18,11 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Lint with stylua
-        uses: JohnnyMorganz/stylua-action@v1
+        uses: JohnnyMorganz/stylua-action@v2
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           # CLI arguments
-          version: 0.15.1
+          version: 0.15.3
           args: --check .
 
   shfmt-check:
@@ -32,13 +32,13 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Setup Go
-        uses: actions/setup-go@v2
+        uses: actions/setup-go@v3
         with:
-          go-version: "1.16"
+          go-version: "1.18"
 
       - name: Use shfmt
         run: |
-          GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
+          go install mvdan.cc/sh/v3/cmd/shfmt@v3.6
 
       # https://google.github.io/styleguide/shellguide.html
       - name: Check formatting

+ 1 - 1
lua/lvim/core/cmp.lua

@@ -368,7 +368,7 @@ function M.setup()
       })
     end
   end
-  
+
   if lvim.builtin.cmp.on_config_done then
     lvim.builtin.cmp.on_config_done(cmp)
   end