This repository was archived by the owner on Dec 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +71
-43
lines changed
Expand file tree Collapse file tree 8 files changed +71
-43
lines changed Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- go-version : [ '1.22 ' ]
15+ go-version : [ '1.24 ' ]
1616 steps :
1717 - uses : actions/checkout@v4
1818 - name : Setup Go
2121 go-version : ${{ matrix.go-version }}
2222 cache : true
2323 - name : golangci-lint
24- uses : golangci/golangci-lint-action@v6
24+ uses : golangci/golangci-lint-action@v7
2525 with :
26- version : v1.59.1
26+ version : v2.0.2
Original file line number Diff line number Diff line change 11name : Unit
22on :
33 pull_request :
4+ branches :
5+ - master
46
57jobs :
68 test :
79 runs-on : ubuntu-latest
810 strategy :
911 matrix :
10- go-version : [ '1.22', '1.23 ' ]
12+ go-version : [ '1.24 ' ]
1113 steps :
12- -
13- name : Checkout
14- uses : actions/checkout@v4
14+ - uses : actions/checkout@v4
1515 - name : Setup Go
1616 uses : actions/setup-go@v5
1717 with :
1818 go-version : ${{ matrix.go-version }}
1919 cache : true
20+ - name : Install dependencies
21+ run : go get .
2022 - name : Test with Go
21- run : go test ./...
23+ run : go test -json ./... 2>&1 | tee -a TestResults-${{ matrix.go-version }}.json
24+ - name : Upload Go test results
25+ uses : actions/upload-artifact@v4
26+ with :
27+ name : Go-results-${{ matrix.go-version }}
28+ path : TestResults-${{ matrix.go-version }}.json
Original file line number Diff line number Diff line change 1- run :
2- go : " 1.22"
3- timeout : 1m
1+ version : " 2"
42linters :
5- enable-all : true
3+ default : all
64 disable :
7- # deprecated
8- - execinquery
9- - gomnd
10- # not relevant
11- - wrapcheck
12- - paralleltest
135 - exhaustruct
6+ - godox
7+ - paralleltest
8+ - varnamelen
9+ - wrapcheck
1410 - tagalign
15- linters-settings :
16- lll :
17- line-length : 140
18- gci :
19- sections :
20- - Standard
21- - Default
22- - Prefix(github.com/gripmock)
23- depguard :
11+ settings :
12+ depguard :
13+ rules :
14+ main :
15+ allow :
16+ - $gostd
17+ - github.com
18+ - golang.org
19+ - google.golang.org
20+ lll :
21+ line-length : 140
22+ exclusions :
23+ generated : lax
24+ presets :
25+ - comments
26+ - common-false-positives
27+ - legacy
28+ - std-error-handling
2429 rules :
25- main :
26- allow :
27- - $gostd
28- - github.com
29- issues :
30- exclude-rules :
31- - path : (.+)_test.go
32- linters :
33- - dupl
30+ - linters :
31+ - dupl
32+ path : (.+)_test.go
33+ paths :
34+ - third_party$
35+ - builtin$
36+ - examples$
37+ formatters :
38+ enable :
39+ - gci
40+ - gofmt
41+ - gofumpt
42+ - goimports
43+ settings :
44+ gci :
45+ sections :
46+ - Standard
47+ - Default
48+ - Prefix(github.com/gripmock)
49+ exclusions :
50+ generated : lax
51+ paths :
52+ - third_party$
53+ - builtin$
54+ - examples$
Original file line number Diff line number Diff line change 44 go test -tags mock -race -cover ./...
55
66lint :
7- go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1 run --color always ${args}
7+ go run github.com/golangci/golangci-lint/v2/ cmd/golangci-lint@v2.0.2 run --color always ${args}
88
99lint-fix :
1010 make lint args=--fix
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package environment
33import (
44 "time"
55
6- env "github.com/caarlos0/env/v10 "
6+ env "github.com/caarlos0/env/v11 "
77)
88
99type watcherType string
Original file line number Diff line number Diff line change 11package environment_test
22
33import (
4- "os"
54 "testing"
65
76 "github.com/stretchr/testify/require"
@@ -43,8 +42,7 @@ func TestConfig_Override(t *testing.T) {
4342 }
4443
4544 for k , v := range env {
46- err := os .Setenv (k , v )
47- require .NoError (t , err )
45+ t .Setenv (k , v )
4846 }
4947
5048 conf , err := environment .New ()
Original file line number Diff line number Diff line change 11module github.com/gripmock/environment
22
3- go 1.22.1
3+ go 1.24
44
55require (
6- github.com/caarlos0/env/v10 v10.0.0
6+ github.com/caarlos0/env/v11 v11.3.1
77 github.com/stretchr/testify v1.10.0
88)
99
Original file line number Diff line number Diff line change 11github.com/caarlos0/env/v10 v10.0.0 h1:yIHUBZGsyqCnpTkbjk8asUlx6RFhhEs+h7TOBdgdzXA =
22github.com/caarlos0/env/v10 v10.0.0 /go.mod h1:ZfulV76NvVPw3tm591U4SwL3Xx9ldzBP9aGxzeN7G18 =
3+ github.com/caarlos0/env/v11 v11.3.1 h1:cArPWC15hWmEt+gWk7YBi7lEXTXCvpaSdCiZE2X5mCA =
4+ github.com/caarlos0/env/v11 v11.3.1 /go.mod h1:qupehSf/Y0TUTsxKywqRt/vJjN5nz6vauiYEUUr8P4U =
35github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
46github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
57github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
You can’t perform that action at this time.
0 commit comments