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