Files
ExploreDNS/.gitea/workflows/ci.yml
81c6d6e4ff fix: downgrade go directive to 1.24 and pin GOTOOLCHAIN=local
go.mod specified go 1.25.6 which triggered automatic toolchain download
via Go's toolchain management. Go 1.25 removed the covdata tool, causing
the CI test step to fail with 'go: no such tool covdata'.

Changes:
- go.mod: downgrade 'go 1.25.6' to 'go 1.24' to match CI setup-go version
- ci.yml: add GOTOOLCHAIN=local env at job level to prevent auto-download
  of newer toolchain versions

Fixes CI failure on main branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-06-08 09:10:36 +10:00

38 lines
910 B
YAML

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
env:
GOTOOLCHAIN: local
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Vet
run: go vet ./...
- name: Test
run: go test -v -race -coverprofile=coverage.out ./...
- name: Coverage report
run: go tool cover -func=coverage.out
- 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}')
echo "Average internal package coverage: ${COVERAGE}%"
- name: Build
run: go build -v ./...