@@ -14,22 +14,12 @@ jobs:
1414 - name : Checkout code
1515 uses : actions/checkout@v4
1616
17- - name : Set up Go
18- uses : actions/setup-go@v4
17+ - uses : actions/setup-go@v5
1918 with :
20- go-version : ' 1.26'
21-
22- - name : Install dependencies
23- run : go mod download
19+ go-version : stable
2420
2521 - name : Run tests
26- run : go test -v -race -coverprofile=coverage.out ./...
27-
28- - name : Upload coverage to Codecov
29- uses : codecov/codecov-action@v3
30- with :
31- file : ./coverage.out
32- fail_ci_if_error : false
22+ run : go test ./...
3323
3424 build :
3525 name : Build
3929 uses : actions/checkout@v4
4030
4131 - name : Set up Go
42- uses : actions/setup-go@v4
32+ uses : actions/setup-go@v5
4333 with :
44- go-version : ' 1.26 '
34+ go-version : stable
4535
4636 - name : Install dependencies
4737 run : go mod download
@@ -64,61 +54,21 @@ jobs:
6454 # Build for macOS ARM64 (Apple Silicon)
6555 GOOS=darwin GOARCH=arm64 go build -o bin/serveradmin-go-darwin-arm64 .
6656
67- - name : Upload build artifacts
68- uses : actions/upload-artifact@v4
69- with :
70- name : serveradmin-go-builds
71- path : bin/
72-
73- lint :
74- name : Lint
57+ format-check :
58+ name : Format Check
7559 runs-on : ubuntu-latest
7660 steps :
7761 - name : Checkout code
7862 uses : actions/checkout@v4
7963
80- - name : Set up Go
81- uses : actions/setup-go@v4
64+ - uses : actions/setup-go@v5
8265 with :
83- go-version : ' 1.26 '
66+ go-version : stable
8467
8568 - name : Run golangci-lint
86- uses : golangci/golangci-lint-action@v4
69+ uses : golangci/golangci-lint-action@v8
8770 with :
8871 version : latest
89- args : --enable-all --timeout=5m --verbose
90- working-directory : .
91- only-new-issues : false
92- fail-on-error : true
93-
94- format-check :
95- name : Format Check
96- runs-on : ubuntu-latest
97- steps :
98- - name : Checkout code
99- uses : actions/checkout@v4
100-
101- - name : Set up Go
102- uses : actions/setup-go@v4
103- with :
104- go-version : ' 1.26'
105-
106- - name : Check gofmt
107- run : |
108- if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
109- echo "Code is not formatted. Please run 'gofmt -s -w .'"
110- gofmt -s -l .
111- exit 1
112- fi
113-
114- - name : Check goimports
115- run : |
116- go install golang.org/x/tools/cmd/goimports@latest
117- if [ "$(goimports -l . | wc -l)" -gt 0 ]; then
118- echo "Imports are not properly formatted. Please run 'goimports -w .'"
119- goimports -l .
120- exit 1
121- fi
12272
12373 - name : Check go mod tidy
12474 run : |
0 commit comments