ci: bump Go to 1.25 and fix goimports drift in 3 files
golangci-lint v2.11.4 requires Go >= 1.25. With the workflow on 1.24, setup-go would silently trigger an in-job auto-toolchain download (observed in run #71: 'go: github.com/golangci/golangci-lint/v2@v2.11.4 requires go >= 1.25.0; switching to go1.25.9') adding ~3 min to every Backend (Go) run. Bump setup-go to 1.25 in ci.yml, backend-ci.yml, go-fuzz.yml so the prebuilt Go is already the right version. Also lint-fix three files that golangci-lint's goimports checker flagged — goimports sorts/groups imports and removes unused ones, which plain gofmt leaves alone: - veza-backend-api/cmd/api/main.go - veza-backend-api/internal/api/handlers/chat_handlers.go - veza-backend-api/internal/handlers/auth_integration_test.go
This commit is contained in:
parent
3a5c6e1840
commit
bec75f1435
6 changed files with 5 additions and 8 deletions
4
.github/workflows/backend-ci.yml
vendored
4
.github/workflows/backend-ci.yml
vendored
|
|
@ -28,7 +28,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.25"
|
||||||
cache: true
|
cache: true
|
||||||
cache-dependency-path: veza-backend-api/go.sum
|
cache-dependency-path: veza-backend-api/go.sum
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.25"
|
||||||
cache: true
|
cache: true
|
||||||
cache-dependency-path: veza-backend-api/go.sum
|
cache-dependency-path: veza-backend-api/go.sum
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.25"
|
||||||
cache: true
|
cache: true
|
||||||
# go.mod/go.sum live under veza-backend-api, not repo root.
|
# go.mod/go.sum live under veza-backend-api, not repo root.
|
||||||
# Without this, setup-go warns "Dependencies file is not
|
# Without this, setup-go warns "Dependencies file is not
|
||||||
|
|
|
||||||
2
.github/workflows/go-fuzz.yml
vendored
2
.github/workflows/go-fuzz.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.25"
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Download deps
|
- name: Download deps
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
// SECURITY(REM-027): pprof removed from production — use build tag or dedicated debug binary instead.
|
// SECURITY(REM-027): pprof removed from production — use build tag or dedicated debug binary instead.
|
||||||
// To enable: go build -tags debug ./cmd/api
|
// To enable: go build -tags debug ./cmd/api
|
||||||
"os"
|
"os"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"veza-backend-api/internal/services"
|
"veza-backend-api/internal/services"
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,11 @@ package handlers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
|
||||||
|
|
||||||
"veza-backend-api/internal/core/auth"
|
"veza-backend-api/internal/core/auth"
|
||||||
"veza-backend-api/internal/database"
|
"veza-backend-api/internal/database"
|
||||||
|
|
@ -26,7 +24,6 @@ import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"go.uber.org/zap"
|
|
||||||
"go.uber.org/zap/zaptest"
|
"go.uber.org/zap/zaptest"
|
||||||
"gorm.io/driver/sqlite"
|
"gorm.io/driver/sqlite"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue