From e3970bfda554cf74f1d52e25040a979838718653 Mon Sep 17 00:00:00 2001 From: Houmgaor Date: Fri, 20 Feb 2026 21:10:03 +0100 Subject: [PATCH] ci: make lint block build and deduplicate test runs - Add lint to build job's needs so lint failures prevent artifacts - Combine race detector + coverage into a single test run - Pin golangci-lint to v2.1.6 to avoid surprise breakage - Rename workflow from go-improved.yml to go.yml --- .github/workflows/{go-improved.yml => go.yml} | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) rename .github/workflows/{go-improved.yml => go.yml} (86%) diff --git a/.github/workflows/go-improved.yml b/.github/workflows/go.yml similarity index 86% rename from .github/workflows/go-improved.yml rename to .github/workflows/go.yml index b7d833edc..4d379b1ca 100644 --- a/.github/workflows/go-improved.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ on: - 'go.mod' - 'go.sum' - 'main.go' - - '.github/workflows/go-improved.yml' + - '.github/workflows/go.yml' pull_request: branches: - main @@ -40,14 +40,8 @@ jobs: - name: Download dependencies run: go mod download - - name: Run Tests - run: go test -v ./... -timeout=10m - - - name: Run Tests with Race Detector - run: go test -race ./... -timeout=10m - - - name: Generate Coverage Report - run: go test -coverprofile=coverage.out ./... + - name: Run Tests with Race Detector and Coverage + run: go test -race -coverprofile=coverage.out ./... -timeout=10m - name: Upload Coverage to Codecov uses: codecov/codecov-action@v3 @@ -58,7 +52,7 @@ jobs: build: name: Build - needs: test + needs: [test, lint] runs-on: ubuntu-latest steps: @@ -119,5 +113,5 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@v7 with: - version: latest + version: v2.1.6 args: --timeout=5m