fix: vendor deps and fix CI go-version, timeout, GOTOOLCHAIN (HAN-414)
CI / test (pull_request) Failing after 3h2m8s
CI / docker (pull_request) Has been cancelled

- Run go mod vendor to eliminate proxy.golang.org network dependency
- Set GOFLAGS=-mod=vendor at job env level so all go commands use vendor/
- Fix go-version from 1.23 to 1.24.0 to match go.mod
- Move GOTOOLCHAIN=local to job-level env (not per-step inline)
- Set cache: false on setup-go (cache is irrelevant with vendoring)
- Add timeout-minutes: 15 so failures are caught quickly instead of 3h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
Gary Hansen
2026-06-11 09:08:51 +10:00
co-authored by Copilot multica-agent
parent 1f23f482c1
commit db806835aa
787 changed files with 390251 additions and 7 deletions
+11 -7
View File
@@ -9,30 +9,34 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
GOTOOLCHAIN: local
GOFLAGS: -mod=vendor
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
go-version: '1.24.0'
cache: false
- name: Vet
run: GOTOOLCHAIN=local go vet ./...
run: go vet ./...
- name: Test
run: GOTOOLCHAIN=local go test -v -race -coverprofile=coverage.out ./...
run: go test -v -race -coverprofile=coverage.out ./...
- name: Coverage report
run: GOTOOLCHAIN=local go tool cover -func=coverage.out
run: go tool cover -func=coverage.out
- name: Check internal package coverage
run: |
COVERAGE=$(GOTOOLCHAIN=local 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 "^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: GOTOOLCHAIN=local go build -v ./...
run: go build -v ./...
docker:
runs-on: ubuntu-latest