From d5957e6e9433936fd065600eb62b89f40bcbbee0 Mon Sep 17 00:00:00 2001 From: Anish Asthana Date: Mon, 31 Jul 2023 16:02:02 -0400 Subject: [PATCH] Create consolidated action for verification of auto-generated / formatted artifacts Signed-off-by: Anish Asthana --- .github/workflows/verify_generated_files.yml | 44 ++++++++++++++++++++ .github/workflows/verify_imports.yml | 20 --------- 2 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/verify_generated_files.yml delete mode 100644 .github/workflows/verify_imports.yml diff --git a/.github/workflows/verify_generated_files.yml b/.github/workflows/verify_generated_files.yml new file mode 100644 index 000000000..5783d4253 --- /dev/null +++ b/.github/workflows/verify_generated_files.yml @@ -0,0 +1,44 @@ +name: Verify Generated Files and Import Organization +on: + push: + branches: + - '**' + paths: + - '**.go' + - '**go.mod' + - '**go.sum' + tags-ignore: + - 'v*' + pull_request: + paths: + - '**.go' + - '**go.mod' + - '**go.sum' +jobs: + verify-generated-functions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Verify that the DeepCopy, DeepCopyInto, and DeepCopyObject method implementations have been generated + run: make generate && git diff --exit-code + + verify-generate-client: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Verify that the latest client has been generated + run: make generate-client && git diff --exit-code + + verify-imports: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Verify that imports are organized + run: make verify-imports + + verify-manifests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Verify that the latest WebhookConfigurations, ClusterRoles, and CustomResourceDefinitions have been generated + run: make manifests && git diff --exit-code diff --git a/.github/workflows/verify_imports.yml b/.github/workflows/verify_imports.yml deleted file mode 100644 index 561b3fd88..000000000 --- a/.github/workflows/verify_imports.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Verify organization of imports -on: - push: - branches: - - '**' - paths: - - '**.go' - tags-ignore: - - 'v*' - pull_request: - paths: - - '**.go' -jobs: - verify-imports: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Verify that imports are organized - run: make verify-imports