Skip to content

Commit

Permalink
Add go.mod checks (#134)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro authored Jan 31, 2025
1 parent 85dae6f commit ae9d05a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/ci-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,35 @@ jobs:
generated-files-check:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
with:
egress-policy: audit
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
submodules: recursive
- name: Verify Protobuf types are up to date
run: make proto && { if git status --porcelain | grep '??'; then exit 1; else git diff --name-status --exit-code; fi }

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

go-mod-tidy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Verify go.mod files are up to date
run: |
go mod tidy && \
(cd internal/tools && go mod tidy) && \
{ if git status --porcelain | grep '??'; then exit 1; else git diff --name-status --exit-code; fi }
lint:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Run lint checks
run: |
make lint
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.22.7
toolchain go1.23.5

require (
github.com/apache/thrift v0.21.0
github.com/gogo/googleapis v1.4.1
github.com/gogo/protobuf v1.3.2
github.com/stretchr/testify v1.10.0
Expand All @@ -14,7 +15,6 @@ require (
)

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

0 comments on commit ae9d05a

Please sign in to comment.