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

alexstocks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go-samples.git


The following commit(s) were added to refs/heads/main by this push:
     new bf11756  ci(fmt): update ci config (#73)
bf11756 is described below

commit bf117566cd976157db783c41f52cbeebbb1b4abd
Author: marsevilspirit <[email protected]>
AuthorDate: Sat Sep 20 16:59:26 2025 +0800

    ci(fmt): update ci config (#73)
---
 .github/workflows/build.yaml           | 13 ++++++++-----
 .github/workflows/codeql.yml           |  7 +++----
 .github/workflows/golangci-lint.yml    |  4 ++--
 .github/workflows/license-checker.yaml |  8 ++++----
 go.mod                                 |  1 +
 go.sum                                 |  2 ++
 6 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 2d1576c..0f98c69 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -19,12 +19,11 @@ name: build
 
 on:
   push:
-    branches: [ "main" ]
+    branches: ["main"]
   pull_request:
-    branches: [ "main" ]
+    branches: ["main"]
 
 jobs:
-
   build:
     runs-on: ubuntu-latest
     steps:
@@ -33,10 +32,14 @@ jobs:
       - name: Set up Go
         uses: actions/setup-go@v4
         with:
-          go-version: '1.18'
+          go-version: "1.20"
 
       - name: Build
         run: go build -v ./...
 
+      - name: Format Code
+        run: |
+          go fmt ./... && git status && [[ -z `git status -s` ]]
+
       - name: Test
-        run: go test -v ./...
\ No newline at end of file
+        run: go test -v ./...
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 9abedcc..6ab5851 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -32,7 +32,7 @@ name: CodeQL
 on:
   pull_request:
     # The branches below must be a subset of the branches above
-    branches: "*"
+    branches: ["*"]
 
 permissions:
   contents: read
@@ -41,8 +41,8 @@ jobs:
   analyse:
     permissions:
       actions: read # for github/codeql-action/init to get workflow details
-      contents: read  # for actions/checkout to fetch code
-      security-events: write  # for github/codeql-action/autobuild to send a 
status report
+      contents: read # for actions/checkout to fetch code
+      security-events: write # for github/codeql-action/autobuild to send a 
status report
     name: Analyse
     runs-on: ubuntu-latest
 
@@ -66,4 +66,3 @@ jobs:
       # Analysis
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@v2
-
diff --git a/.github/workflows/golangci-lint.yml 
b/.github/workflows/golangci-lint.yml
index e92112e..d2b0345 100644
--- a/.github/workflows/golangci-lint.yml
+++ b/.github/workflows/golangci-lint.yml
@@ -23,9 +23,9 @@ name: "golang ci lint"
 on:
   # Triggers the workflow on push or pull request events but only for the 
master branch
   push:
-    branches: [ master ]
+    branches: [master]
   pull_request:
-    branches: "*"
+    branches: ["*"]
 
   # Allows you to run this workflow manually from the Actions tab
 #  workflow_dispatch:
diff --git a/.github/workflows/license-checker.yaml 
b/.github/workflows/license-checker.yaml
index b907c8e..ff9c024 100644
--- a/.github/workflows/license-checker.yaml
+++ b/.github/workflows/license-checker.yaml
@@ -18,9 +18,9 @@ name: License checker
 
 on:
   push:
-    branches: [ "main" ]
+    branches: ["main"]
   pull_request:
-    branches: [ "main" ]
+    branches: ["main"]
 
 jobs:
   check-license:
@@ -36,7 +36,7 @@ jobs:
       # step 3 
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
       - uses: actions/setup-node@v3
         with:
-          node-version: '14.x'
+          node-version: "14.x"
       # step 4 check license
       - name: Check License Header
         uses: 
apache/skywalking-eyes/header@8fc52baabc14c86294d96034bcc194cfa7f76b05
@@ -50,4 +50,4 @@ jobs:
         with:
           log: info
           config: .licenserc.yaml
-          mode: check
\ No newline at end of file
+          mode: check
diff --git a/go.mod b/go.mod
index 9530411..9ffc9dd 100644
--- a/go.mod
+++ b/go.mod
@@ -18,6 +18,7 @@ require (
 //replace seata.apache.org/seata-go => ../seata-go
 
 require (
+       cloud.google.com/go/compute v1.19.1 // indirect
        cloud.google.com/go/compute/metadata v0.2.3 // indirect
        github.com/RoaringBitmap/roaring v1.2.3 // indirect
        github.com/Workiva/go-datastructures v1.0.52 // indirect
diff --git a/go.sum b/go.sum
index dbf0e92..74fd412 100644
--- a/go.sum
+++ b/go.sum
@@ -115,6 +115,8 @@ cloud.google.com/go/compute v1.12.0/go.mod 
h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x
 cloud.google.com/go/compute v1.12.1/go.mod 
h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU=
 cloud.google.com/go/compute v1.13.0/go.mod 
h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE=
 cloud.google.com/go/compute v1.14.0/go.mod 
h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo=
+cloud.google.com/go/compute v1.19.1 
h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY=
+cloud.google.com/go/compute v1.19.1/go.mod 
h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE=
 cloud.google.com/go/compute/metadata v0.1.0/go.mod 
h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU=
 cloud.google.com/go/compute/metadata v0.2.0/go.mod 
h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
 cloud.google.com/go/compute/metadata v0.2.1/go.mod 
h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to