diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67f440d53..4a1e94e2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,37 @@ on: - main pull_request: +permissions: + contents: read + +env: + GOLANGCI_LINT_VERSION: v1.61.0 + jobs: - build-lint-test: - name: CI + lint: + name: Lint Go + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: ${{env.GOLANGCI_LINT_VERSION}} + args: | + "./..." --timeout=7m + skip-cache: true + install-mode: binary + + build-test: + name: Build and Test + needs: lint runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml deleted file mode 100644 index 24cb41369..000000000 --- a/.github/workflows/go-lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Lint Go -on: - push: - branches: - - main - pull_request: - -permissions: - contents: read - -env: - GOLANGCI_LINT_VERSION: v1.61.0 -jobs: - lint-go: - name: Lint Go - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: ./go.mod - - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: ${{env.GOLANGCI_LINT_VERSION}} - args: | - "./..." --timeout=7m - skip-cache: true - install-mode: binary