Skip to content

Commit ae9d05a

Browse files
authored
Add go.mod checks (#134)
Signed-off-by: Yuri Shkuro <[email protected]>
1 parent 85dae6f commit ae9d05a

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

.github/workflows/ci-lint-test.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,35 @@ jobs:
2020
generated-files-check:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
24-
with:
25-
egress-policy: audit
26-
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
23+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2724
with:
2825
submodules: recursive
2926
- name: Verify Protobuf types are up to date
3027
run: make proto && { if git status --porcelain | grep '??'; then exit 1; else git diff --name-status --exit-code; fi }
3128

32-
- name: Verify Thrift types are up to date
29+
- name: Verify Thrift types are up to date
3330
run: make thrift && { if git status --porcelain | grep '??'; then exit 1; else git diff --name-status --exit-code; fi }
3431

32+
go-mod-tidy-check:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
36+
- name: Verify go.mod files are up to date
37+
run: |
38+
go mod tidy && \
39+
(cd internal/tools && go mod tidy) && \
40+
{ if git status --porcelain | grep '??'; then exit 1; else git diff --name-status --exit-code; fi }
41+
3542
lint:
3643
runs-on: ubuntu-latest
3744
steps:
3845
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
3946
with:
4047
egress-policy: audit
41-
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
48+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
4249
- uses: actions/setup-python@v5
4350
with:
4451
python-version: '3.x'
4552
- name: Run lint checks
4653
run: |
4754
make lint
48-
49-
50-
51-
52-

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.22.7
55
toolchain go1.23.5
66

77
require (
8+
github.com/apache/thrift v0.21.0
89
github.com/gogo/googleapis v1.4.1
910
github.com/gogo/protobuf v1.3.2
1011
github.com/stretchr/testify v1.10.0
@@ -14,7 +15,6 @@ require (
1415
)
1516

1617
require (
17-
github.com/apache/thrift v0.21.0 // indirect
1818
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1919
github.com/kr/text v0.2.0 // indirect
2020
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect

0 commit comments

Comments
 (0)