From 84dad26f9c8eadc5cfa5d53f3c0efe7ea6909075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20HERZOG?= Date: Fri, 13 Mar 2026 12:37:33 +0000 Subject: [PATCH] PB-50035 - Go: Add linting to ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédric HERZOG --- .github/workflows/.go.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/.release.yml | 4 ++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/.go.yml diff --git a/.github/workflows/.go.yml b/.github/workflows/.go.yml new file mode 100644 index 0000000..269c22e --- /dev/null +++ b/.github/workflows/.go.yml @@ -0,0 +1,32 @@ +name: Go + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.25' + - name: golangci-lint + uses: golangci/golangci-lint-action@v7 + with: + version: v2.4 + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.25' + - name: Test + run: go test -v ./... + - name: Vet + run: go vet ./... diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml index c6283f5..3c511af 100644 --- a/.github/workflows/.release.yml +++ b/.github/workflows/.release.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.25' - name: Run Tests run: go test -v ./... @@ -40,7 +40,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.25' - name: Generate Man and Completions run: |