From be1729ef40ff55c2d9bd259a2d36469704114ba3 Mon Sep 17 00:00:00 2001 From: Shubham Date: Sat, 6 Jun 2026 06:39:19 +0530 Subject: [PATCH 1/2] ci: add native go vet static analysis to validation and release pipelines (#416) --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/release.yml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f31e5d..0da6c05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,8 @@ jobs: ${{ runner.os }}-go- - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... - name: Run tests run: go test ./... @@ -49,6 +51,8 @@ jobs: ${{ runner.os }}-go- - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... - name: Build run: go build -v ./... @@ -73,6 +77,8 @@ jobs: ${{ runner.os }}-go- - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... - name: Calculate next tag run: | latest_tag=$(git tag --sort=-version:refname | head -1) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bb5eb0..2fc0e19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,9 @@ jobs: - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... + - name: Build binary env: GOOS: ${{ matrix.goos }} From 8fd0f8399e3ba132bf4241259b84048c0752b00d Mon Sep 17 00:00:00 2001 From: Shubham Date: Sat, 6 Jun 2026 06:52:18 +0530 Subject: [PATCH 2/2] ci: align Go versions and optimize release workflow matrix (#416) --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0da6c05..9edcb23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.24.2" - name: Cache Go modules uses: actions/cache@v5 with: @@ -41,7 +41,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.24.2" - name: Cache Go modules uses: actions/cache@v5 with: @@ -67,7 +67,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.24.2" - name: Cache Go modules uses: actions/cache@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fc0e19..fd22af7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,25 @@ permissions: contents: write jobs: + vet: + name: static-analysis + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.2' + cache: true + - name: Download dependencies + run: go mod download + - name: Run go vet + run: go vet ./... + build: name: Build & Release (${{ matrix.suffix }}) + needs: [vet] runs-on: ubuntu-latest strategy: @@ -44,15 +61,12 @@ jobs: uses: actions/setup-go@v5 with: # Keep in sync with the go directive in go.mod. - go-version: '1.24' + go-version: '1.24.2' cache: true - name: Download dependencies run: go mod download - - name: Run go vet - run: go vet ./... - - name: Build binary env: GOOS: ${{ matrix.goos }}