File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,22 +20,18 @@ jobs:
2020 - name : Marking workdir safe
2121 run : git config --global --add safe.directory /__w/ots/ots
2222
23- - name : ' Lint and test code: API '
23+ - name : Initialize Go Workspace
2424 run : |
25- go test -cover -v ./...
26- golangci-lint run ./...
25+ go work init
26+ find . -name 'go.mod' | xargs dirname | xargs go work use
2727
28- - name : ' Lint and test code: Client'
29- working-directory : ./pkg/client
28+ - name : Run golangci-lint
3029 run : |
31- go test -cover -v ./...
32- golangci-lint run ./...
30+ golangci-lint run $(go list -f "{{.Dir}}/..." -m)
3331
34- - name : ' Lint and test code: OTS-CLI'
35- working-directory : ./cmd/ots-cli
32+ - name : Run go test
3633 run : |
37- go test -cover -v ./...
38- golangci-lint run ./...
34+ go list -m | xargs go test -v -cover
3935
4036 - name : Generate (and validate) translations
4137 run : make translate
Original file line number Diff line number Diff line change @@ -29,22 +29,18 @@ jobs:
2929 - name : Marking workdir safe
3030 run : git config --global --add safe.directory /__w/ots/ots
3131
32- - name : ' Lint and test code: API '
32+ - name : Initialize Go Workspace
3333 run : |
34- go test -cover -v ./...
35- golangci-lint run ./...
34+ go work init
35+ find . -name 'go.mod' | xargs dirname | xargs go work use
3636
37- - name : ' Lint and test code: Client'
38- working-directory : ./pkg/client
37+ - name : Run golangci-lint
3938 run : |
40- go test -cover -v ./...
41- golangci-lint run ./...
39+ golangci-lint run $(go list -f "{{.Dir}}/..." -m)
4240
43- - name : ' Lint and test code: OTS-CLI'
44- working-directory : ./cmd/ots-cli
41+ - name : Run go test
4542 run : |
46- go test -cover -v ./...
47- golangci-lint run ./...
43+ go list -m | xargs go test -v -cover
4844
4945 - name : Generate (and validate) translations
5046 run : make translate
You can’t perform that action at this time.
0 commit comments