From 53df5097454b02bf1fd3984aeccb0210ddb0f62b Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Tue, 28 May 2024 11:24:58 +0200 Subject: [PATCH] merge sanity check and verify ghas Signed-off-by: Per Goncalves da Silva --- .github/workflows/sanity.yaml | 23 ++++++++++++++--------- .github/workflows/verify.yml | 22 ---------------------- 2 files changed, 14 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/verify.yml diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 0f81e18fd0..f2a9e595a8 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -7,25 +7,30 @@ on: workflow_dispatch: merge_group: jobs: - vendor: + check-vendor: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - name: Run sanity checks + - name: Verify vendor directory run: make vendor && make diff - lint: + static-analysis: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: "go.mod" - - name: Run linting checks - uses: "golangci/golangci-lint-action@v6" - with: - version: "v1.58.2" - skip-pkg-cache: true - \ No newline at end of file + - name: Run static analysis tools + run: make lint vet + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + - name: Verify generated code (mocks, clients, listers, etc.) + run: make verify \ No newline at end of file diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml deleted file mode 100644 index 90d976cae3..0000000000 --- a/.github/workflows/verify.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: verify -on: - push: - branches: - - master - pull_request: - workflow_dispatch: - merge_group: -jobs: - verify: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: "go.mod" - - # Note(tflannag): We need to explicitly setup the GOPATH as the generate-internal-groups.sh - # codegen script still relies on $GOPATH being set and will return an error otherwise. - # The setup-go action does not set this value for us: https://github.com/actions/setup-go/issues/14. - - name: Run the verify target - run: GOPATH=$(go env GOPATH) make verify