LOGBROKER-10206 Refactor writers #10044
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: lint | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - release-* | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| GOLANGCI_LINT_VERSION: v2.4.0 | |
| GO_VERSION: '1.25' | |
| jobs: | |
| golangci: | |
| if: (!contains(github.event.pull_request.labels.*.name, 'no lint')) | |
| name: golangci-lint | |
| concurrency: | |
| group: lint-golangci-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - uses: actions/checkout@v4 | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: ${{ env.GOLANGCI_LINT_VERSION }} | |
| args: --timeout=5m | |
| golangci-examples: | |
| name: golangci-lint-examples | |
| concurrency: | |
| group: lint-golangci-examples-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - uses: actions/checkout@v4 | |
| - name: generate examples golangci-lint config | |
| run: ./.github/scripts/golangci-lint-gen-configs.sh | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: ${{ env.GOLANGCI_LINT_VERSION }} | |
| args: --timeout=5m | |
| working-directory: examples | |
| golangci-slo: | |
| if: (!contains(github.event.pull_request.labels.*.name, 'no lint')) | |
| name: golangci-lint-slo | |
| concurrency: | |
| group: lint-golangci-slo-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - uses: actions/checkout@v4 | |
| - name: generate slo golangci-lint config | |
| run: ./.github/scripts/golangci-lint-gen-configs.sh | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: ${{ env.GOLANGCI_LINT_VERSION }} | |
| args: --timeout=5m | |
| working-directory: tests/slo | |
| autoformatter: | |
| if: (!contains(github.event.pull_request.labels.*.name, 'no lint')) | |
| name: autoformat check | |
| concurrency: | |
| group: lint-autoformat-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24.x" | |
| - name: Install utilities | |
| run: | | |
| go install mvdan.cc/gofumpt@v0.7.0 | |
| go install github.com/daixiang0/gci@v0.12.1 | |
| - name: format all files with auto-formatter | |
| run: bash ./.github/scripts/format-all-go-code.sh "$PWD" | |
| - name: Check repository diff | |
| run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken" |