File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,14 @@ jobs:
100100 # scan-codeql,
101101 # scan-intermediate-image
102102 ]
103+ strategy :
104+ matrix :
105+ module :
106+ - " ."
107+ - " ./api"
108+ - " ./pkg/cluster-handler"
109+ - " ./pkg/data-handler"
110+ - " ./pkg/resource-handler"
103111 runs-on : ubuntu-latest
104112 steps :
105113 - name : Check out code
@@ -108,19 +116,23 @@ jobs:
108116 - name : Install Go
109117 uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
110118 with :
111- go-version-file : go.mod
119+ go-version-file : ${{ matrix.module }}/ go.mod
112120
113121 - name : Run linter
114122 uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
123+ with :
124+ working-directory : ${{ matrix.module }}
125+ args : --config=${{ github.workspace }}/.golangci.toml
115126
116127 - name : Run tests
117128 run : |-
129+ cd ${{ matrix.module}}
118130 go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...
119131
120132 # - name: Check test coverage
121133 # uses: vladopajic/go-test-coverage@cc5012c2cfa84542e02b079141958a885861d326 # v2.17.0
122134 # with:
123- # config: . /.testcoverage.yml
135+ # config: ${{ matrix.module }} /.testcoverage.yml
124136
125137 build-scan-push-container :
126138 needs : [ test-go ]
You can’t perform that action at this time.
0 commit comments