Skip to content

Commit d45c1fe

Browse files
go mod tidy diff check in gha (kubeflow#1787)
* go mod tidy diff check in gha Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com> * update go.mod to clear test Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com> --------- Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
1 parent 9d1462e commit d45c1fe

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Go Mod Tidy Diff Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
tidy-check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: '1.24'
22+
23+
- name: Cache Go modules
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/go/pkg/mod
27+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
28+
restore-keys: |
29+
${{ runner.os }}-go-
30+
31+
- name: Run go mod tidy and check for changes
32+
run: |
33+
go mod tidy
34+
git diff --exit-code go.mod go.sum

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/kubeflow/model-registry
33
go 1.24.4
44

55
require (
6+
github.com/DATA-DOG/go-sqlmock v1.5.2
67
github.com/alecthomas/participle/v2 v2.1.4
78
github.com/go-chi/chi/v5 v5.2.3
89
github.com/go-chi/cors v1.2.2
@@ -13,6 +14,7 @@ require (
1314
github.com/kserve/kserve v0.15.2
1415
github.com/kubeflow/model-registry/catalog/pkg/openapi v0.0.0-00010101000000-000000000000
1516
github.com/kubeflow/model-registry/pkg/openapi v0.0.0
17+
github.com/lib/pq v1.10.9
1618
github.com/onsi/ginkgo v1.16.5
1719
github.com/onsi/ginkgo/v2 v2.25.2
1820
github.com/onsi/gomega v1.38.2
@@ -45,7 +47,6 @@ require (
4547
cloud.google.com/go/monitoring v1.22.0 // indirect
4648
cloud.google.com/go/storage v1.50.0 // indirect
4749
filippo.io/edwards25519 v1.1.0 // indirect
48-
github.com/DATA-DOG/go-sqlmock v1.5.2 // indirect
4950
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect
5051
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect
5152
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect
@@ -102,7 +103,6 @@ require (
102103
github.com/josharian/intern v1.0.0 // indirect
103104
github.com/json-iterator/go v1.1.12 // indirect
104105
github.com/leodido/go-urn v1.4.0 // indirect
105-
github.com/lib/pq v1.10.9 // indirect
106106
github.com/mailru/easyjson v0.9.0 // indirect
107107
github.com/moby/docker-image-spec v1.3.1 // indirect
108108
github.com/moby/go-archive v0.1.0 // indirect

0 commit comments

Comments
 (0)