Skip to content

Commit

Permalink
chore: add CI check to verify codegen (#821)
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Suen <[email protected]>
  • Loading branch information
jessesuen authored Nov 6, 2020
1 parent 7e150ac commit ac74a9b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,25 @@ jobs:
uses: codecov/codecov-action@v1
with:
file: coverage.out

codegen:
name: Verify Codegen
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Golang
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Download & vendor dependencies
run: |
# We need to vendor go modules for codegen yet
go mod download
go mod vendor -v
- name: Run codegen
run: |
make codegen
make manifests
- name: Ensure nothing changed
run: git diff --exit-code
1 change: 1 addition & 0 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ cp -r "${TEMP_DIR}/github.com/argoproj/argo-rollouts/." "${SCRIPT_ROOT}/"
CONTROLLERGEN_VERSION=$(go list -m sigs.k8s.io/controller-tools | awk '{print $2}' | head -1)
CONTROLLERGEN_PKG=$(echo `go env GOPATH`"/pkg/mod/sigs.k8s.io/controller-tools@${CONTROLLERGEN_VERSION}")
go build -o dist/controller-gen $CONTROLLERGEN_PKG/cmd/controller-gen/
./dist/controller-gen --version

0 comments on commit ac74a9b

Please sign in to comment.