Skip to content

Commit 514696e

Browse files
committed
Add job to check proto generation
This commit adds an additional github actions job that ensures any changes to the protobuf definitions have been generated and committed. Signed-off-by: David Bond <davidsbond93@gmail.com>
1 parent 86e91a5 commit 514696e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/go.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,23 @@ jobs:
3434

3535
- name: Run tests
3636
run: make test
37+
38+
generate:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4.2.2
43+
44+
- name: Install Go
45+
uses: actions/setup-go@v5
46+
with:
47+
go-version-file: go.mod
48+
cache: true
49+
50+
- name: Run tests
51+
run: make generate
52+
53+
- name: Check changes
54+
run: |
55+
git add .
56+
git diff --staged --exit-code

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ test: test-plugin
33

44
test-plugin:
55
go build ./testdata/test_plugin
6+
7+
generate:
8+
go generate ./...

0 commit comments

Comments
 (0)