fix(ci): use go-test-coverage binary directly to fix Gitea Actions (#88)
Release / release (push) Successful in 56s
dbsetup / vulnerabilities (push) Successful in 1m57s
dbsetup / test (push) Successful in 2m39s
pre-commit / pre-commit (push) Successful in 6m50s

## Summary

- `vladopajic/go-test-coverage@v2` (v2.18.5+, released 2026-04-26/27) restructured the composite action to pass inputs via env-var mapping instead of CLI args. Gitea `act_runner` doesn't expand `${{ }}` expressions inside docker-action `env:` blocks reliably, so the literal string `${{ inputs.config }}` reached the binary and broke the 'Check coverage' step.
- Replace the action with a direct `go install` + binary invocation (matching the established Frostmoln pattern).
- Use the tool's `--github-action-output` to expose `total-coverage` as a step output, replacing the manual `go tool cover -func | grep | awk` calculations in the compare and PR-comment steps.
- Baseline artifact now stores the percentage directly instead of the full coverage profile.

## Test plan

- [x] `pre-commit run --all-files` passes
- [ ] CI passes on this PR
- [ ] After merge, baseline artifact format propagates on next push to main

Reviewed-on: #88
This commit was merged in pull request #88.
This commit is contained in:
2026-04-29 05:44:54 +00:00
parent 46493a3896
commit bdff36b446
3 changed files with 14 additions and 19 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# Coverage configuration for go-test-coverage
# https://github.com/vladopajic/go-test-coverage
profile: coverage.txt
profile: coverage.out
threshold:
file: 0