fix: update CI to use Go version from go.mod and fix module path in coverage check
- Replace hardcoded go-version '1.24' with go-version-file: 'go.mod' so CI always uses the toolchain version that matches the module's requirements (go.mod currently declares go 1.25.6) - Fix 'Check internal package coverage' step: update grep pattern from old module path 'github.com/hits/ExploreDNS/internal' to the renamed path 'gitea.hansenits.com.au/hits/ExploreDNS/internal' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Copilot
multica-agent
parent
5d4fa94286
commit
671a23e6e1
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24'
|
||||
go-version-file: 'go.mod'
|
||||
cache: true
|
||||
|
||||
- name: Vet
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- name: Check internal package coverage
|
||||
run: |
|
||||
COVERAGE=$(go tool cover -func=coverage.out | grep "^github.com/hits/ExploreDNS/internal" | awk '{print $3}' | sed 's/%//' | awk '{sum+=$1; count++} END {if(count>0) print sum/count; else print 0}')
|
||||
COVERAGE=$(go tool cover -func=coverage.out | grep "^gitea.hansenits.com.au/hits/ExploreDNS/internal" | awk '{print $3}' | sed 's/%//' | awk '{sum+=$1; count++} END {if(count>0) print sum/count; else print 0}')
|
||||
echo "Average internal package coverage: ${COVERAGE}%"
|
||||
|
||||
- name: Build
|
||||
|
||||
Reference in New Issue
Block a user