Skip to content

Commit f42e767

Browse files
authored
ci: update go version gh action (#1651)
1 parent f8654d0 commit f42e767

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

.github/workflows/ci_server.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: ci-server
22
on:
33
workflow_call:
44
env:
5-
GO_VERSION: "1.23.5"
5+
GO_VERSION: "1.24"
66

77
jobs:
88
ci-server-lint:
@@ -11,16 +11,21 @@ jobs:
1111
steps:
1212
- name: checkout
1313
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
with:
15+
fetch-depth: 0
16+
ref: ${{ github.head_ref }}
17+
- name: Fetch base branch
18+
run: git fetch origin main
1419
- name: set up
1520
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
1621
with:
1722
go-version: ${{ env.GO_VERSION }}
1823
cache: false
1924
- name: golangci-lint
20-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
25+
uses: golangci/golangci-lint-action@v8
2126
with:
22-
version: v1.63.4
23-
args: --timeout=10m
27+
version: v2.1
28+
args: --new-from-rev=origin/main --timeout=10m
2429
working-directory: server
2530
- name: Run go generate
2631
run: |

server/.golangci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
issues:
2-
exclude-use-default: false
3-
1+
version: "2"
42
linters:
3+
exclusions:
4+
presets:
5+
- comments
6+
- common-false-positives
7+
- legacy
8+
- std-error-handling
9+
10+
formatters:
511
enable:
612
- gofmt
713
- goimports
8-
9-
linters-settings:
10-
goimports:
11-
local-prefixes: github.com/reearth/server
14+
settings:
15+
goimports:
16+
local-prefixes:
17+
- github.com/reearth/server

0 commit comments

Comments
 (0)