Work around Go 1.25.0 covdata bug in test task
Co-authored-by: Snider <631881+Snider@users.noreply.github.com>
This commit is contained in:
parent
ebacce6a22
commit
135e286fcf
1 changed files with 15 additions and 1 deletions
16
Taskfile.yml
16
Taskfile.yml
|
|
@ -22,7 +22,21 @@ tasks:
|
||||||
- build
|
- build
|
||||||
test:
|
test:
|
||||||
cmds:
|
cmds:
|
||||||
- go test -coverprofile=coverage.txt ./...
|
# Workaround for Go 1.25.0 bug: "no such tool covdata" messages cause non-zero exit
|
||||||
|
# Run tests and check output for actual failures (FAIL lines) vs just covdata warnings
|
||||||
|
- |
|
||||||
|
if output=$(go test -coverprofile=coverage.txt ./... 2>&1); then
|
||||||
|
echo "$output"
|
||||||
|
else
|
||||||
|
# Check if it's only covdata errors (no actual FAIL messages)
|
||||||
|
if echo "$output" | grep -q "^FAIL"; then
|
||||||
|
echo "$output"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# Only covdata warnings, tests actually passed
|
||||||
|
echo "$output"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
test-e2e:
|
test-e2e:
|
||||||
cmds:
|
cmds:
|
||||||
- task: build
|
- task: build
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue