Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

ci: verify go modules #1163

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/reusable-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ jobs:
${{ runner.os }}-go-${{ github.ref_name }}-
${{ runner.os }}-go-${{ github.event.repository.default_branch }}-

- name: Verify go modules
run: |
make gomod-list
make gomod-tidy
[[ -z "$(git status --porcelain)" ]] || exit 1

- name: Cache golangci-lint cache
uses: actions/cache@v4
with:
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ $(TIDYGOMODULES):
.PHONY: gomod-tidy
gomod-tidy: $(TIDYGOMODULES) ## Run go mod tidy for all go modules

.PHONY: $(MODLISTGOMODULES)
MODLISTGOMODULES = $(addprefix modlist-, $(GOMODULES))

$(MODLISTGOMODULES):
cd $(dir $(@:modlist-%=%)) && go list -m -mod=readonly all 1> /dev/null

.PHONY: gomod-list
gomod-list: $(MODLISTGOMODULES)

.PHONY: ui
ui: ## Build UI component
$(info Building UI ...)
Expand Down
1 change: 1 addition & 0 deletions api/server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ require (
)

replace (
github.com/openclarity/vmclarity/api/client => ../client
github.com/openclarity/vmclarity/api/types => ../types
github.com/openclarity/vmclarity/cli => ../../cli
github.com/openclarity/vmclarity/uibackend/types => ../../uibackend/types
Expand Down
2 changes: 0 additions & 2 deletions installation/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE=
github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk=
github.com/openclarity/vmclarity/utils v0.0.0-20240202114539-0b2edd72c17d h1:cr5ZWsff7LpTBFlVJ6/VC+6AI9MGGIZz2RiPWrbS0CI=
github.com/openclarity/vmclarity/utils v0.0.0-20240202114539-0b2edd72c17d/go.mod h1:B/7rEt65E+IJBmY7D7Ryy9oZ66ifz2Fxid1i44N8flo=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ require (
replace helm.sh/helm/v3 => github.com/zregvart/helm/v3 v3.0.0-20240102124916-a62313e07d76

replace (
github.com/openclarity/vmclarity/api/types => ../api/types
github.com/openclarity/vmclarity/api/client => ../api/client
github.com/openclarity/vmclarity/api/types => ../api/types
github.com/openclarity/vmclarity/cli => ../cli
github.com/openclarity/vmclarity/containerruntimediscovery/client => ../containerruntimediscovery/client
github.com/openclarity/vmclarity/containerruntimediscovery/types => ../containerruntimediscovery/types
Expand Down
Loading