File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -19,26 +19,19 @@ jobs:
1919 uses : actions/setup-go@v2
2020 with :
2121 go-version : ' 1.24.0' # Use the Go version that Gitea supports
22- # Step 3: Cache Go modules to speed up builds
23- - name : Cache Go modules
24- uses : actions/cache@v2
25- with :
26- path : ~/go/pkg/mod
27- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
28- restore-keys : |
29- ${{ runner.os }}-go-
22+
3023 # Step 3: Install dependencies
3124 - name : Install dependencies
32- run : |
33- go mod tidy
34- # Step 4: Run Go Linter (golangci-lint)
35- - name : Install golangci-lint
36- run : |
37- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
38- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
25+ run : go mod download
26+
27+ - name : Run unit tests
28+ run : go test ./... -v
29+ continue-on-error : true
3930
40- - name : Run golangci-lint
41- run : golangci-lint run --disable-all -E gofmt -E govet --timeout=5m
31+ - name : Run linting
32+ run : |
33+ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
34+ golangci-lint run
4235
4336 docker :
4437 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ linters:
2020 - staticcheck
2121 - stylecheck
2222 - tenv
23-
23+ - testifylint
2424 - typecheck
2525 - unconvert
2626 - unused
@@ -35,6 +35,12 @@ output:
3535 sort-order : [file]
3636 show-stats : true
3737
38+ linters-settings :
39+ testifylint :
40+ disable :
41+ - go-require
42+ - require-error
43+
3844
3945 stylecheck :
4046 checks : ["all", "-ST1005", "-ST1003"]
You can’t perform that action at this time.
0 commit comments