From 0b0f68603c33f606fa6aad775d9434c2a6db04d8 Mon Sep 17 00:00:00 2001 From: Aaron Kuehler Date: Mon, 27 Nov 2023 07:43:13 -0500 Subject: [PATCH] Add up-to-date generated code ci checks --- .github/workflows/ci.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1ec437f47..b660b175d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,6 +22,22 @@ jobs: version: v1.53 args: --timeout=15m + codegen-up-to-date: + name: Code generation up-to-date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Kubebuilder client and CRD up-to-date + run: | + make update-codegen generate-crd + - name: Check for changes in generated files + run: | + git diff --exit-code + - name: Fail if changes detected + if: steps.codegen-up-to-date.outputs.exit_code != 0 + run: | + exit 1 + unit-test: name: Unit test runs-on: ubuntu-latest @@ -35,7 +51,7 @@ jobs: integration-test: name: Integration test runs-on: ubuntu-latest - needs: [check, unit-test] + needs: [check, codegen-up-to-date, unit-test] strategy: matrix: kubernetes: