Skip to content

Commit

Permalink
Add a check for consistency of generated manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan West <[email protected]>
  • Loading branch information
jgwest committed Jul 22, 2024
1 parent 2703166 commit 4ad2fab
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/codegen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Verify generated code is up to date
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
check-go-modules:
name: "Check for go.mod/go.sum synchronicity"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Download all Go modules
run: |
go mod download
- name: Check for tidyness of go.mod and go.sum
run: |
go mod tidy
git diff --exit-code -- .
check-sdk-codegen:
name: "Check for changes from make bundle"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run make bundle
run: |
make bundle
- name: Ensure there is no diff in bundle
run: |
git diff --exit-code -- .
- name: Run make generate
run: |
make generate
- name: Ensure there is no diff in generated assets
run: |
git diff --exit-code -- .
- name: Run make manifests
run: |
make manifests
- name: Ensure there is no diff in manifests
run: |
git diff --exit-code -- .

0 comments on commit 4ad2fab

Please sign in to comment.