From 809eba141b046a9d690123116a43b3d5f12ebe71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kalke?= <56382792+MichalKalke@users.noreply.github.com> Date: Tue, 7 May 2024 15:39:53 +0200 Subject: [PATCH] Move lint to separate file (#955) --- .github/workflows/lint.yaml | 36 ++++++++++++++++++++++++ .github/workflows/operator-verify.yaml | 11 -------- .github/workflows/serverless-verify.yaml | 12 -------- 3 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..1f24e49c1 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,36 @@ +name: Lint test + +on: + pull_request: + paths: + - 'components/operator/**' + - 'components/serverless/**' + - '.github/**' + types: + - opened + - reopened + - synchronize + - ready_for_review + - converted_to_draft + +jobs: + operator-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-go + - uses: golangci/golangci-lint-action@v3 + with: + version: latest + working-directory: 'components/operator' + + serverless-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-go + - uses: ./.github/actions/setup-libgit2 + - uses: golangci/golangci-lint-action@v3 + with: + version: latest + working-directory: 'components/serverless' diff --git a/.github/workflows/operator-verify.yaml b/.github/workflows/operator-verify.yaml index c605a20eb..d95096883 100644 --- a/.github/workflows/operator-verify.yaml +++ b/.github/workflows/operator-verify.yaml @@ -15,17 +15,6 @@ on: - converted_to_draft jobs: - operator-lint: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-go - - uses: golangci/golangci-lint-action@v3 - with: - version: latest - working-directory: 'components/operator' - operator-unit-tests: if: github.event_name == 'pull_request' runs-on: ubuntu-latest diff --git a/.github/workflows/serverless-verify.yaml b/.github/workflows/serverless-verify.yaml index b251d1298..b736c095d 100644 --- a/.github/workflows/serverless-verify.yaml +++ b/.github/workflows/serverless-verify.yaml @@ -15,18 +15,6 @@ on: - converted_to_draft jobs: - serverless-lint: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup-go - - uses: ./.github/actions/setup-libgit2 - - uses: golangci/golangci-lint-action@v3 - with: - version: latest - working-directory: 'components/serverless' - serverless-unit-tests: if: github.event_name == 'pull_request' runs-on: ubuntu-latest