Skip to content

Fix coverage job config parsing - #19

Merged
korylprince merged 1 commit into
macadmins:mainfrom
korylprince:fix-coverage-config
Nov 12, 2026
Merged

korylprince merged 1 commit into
macadmins:mainfrom
korylprince:fix-coverage-config

Conversation

@korylprince

Copy link
Copy Markdown
Contributor

Summary

The coverage job currently fails on every PR before measuring anything:

failed loading config from file: failed parsing config file: yaml: unmarshal errors:
  line 12: field local-prefix not found in type testcoverage.Config

The workflow uses vladopajic/go-test-coverage@v2, which now resolves to v2.23.0. That release enables strict config parsing (unknown keys are rejected), and local-prefix is no longer a supported option, so it went from being silently ignored to being fatal.

This removes local-prefix from .testcoverage.yml. No thresholds or exclusions change.

Testing

Ran locally against main with go-test-coverage v2.23.0:

File coverage threshold (50%) satisfied:	PASS
Package coverage threshold (50%) satisfied:	PASS
Total coverage threshold (70%) satisfied:	PASS
Total test coverage: 79.5% (524/659)

🤖 Generated with Claude Code

go-test-coverage v2.23.0 rejects unknown config keys, and local-prefix
is no longer a supported option, so the coverage job fails while
parsing .testcoverage.yml before measuring anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 20:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟢 Approval recommended

The change is a minimal configuration fix that removes an unsupported .testcoverage.yml key to stop strict YAML parsing failures while leaving all existing coverage thresholds and exclusions unchanged.

No open issues 🎉

What changed in this PR

Fixes the GitHub Actions coverage job failing due to strict YAML config parsing in newer vladopajic/go-test-coverage@v2 releases by removing an unsupported config key.

Changes:

  • Removed the deprecated/unsupported local-prefix entry from .testcoverage.yml to prevent YAML unmarshal errors.
  • Kept all existing coverage thresholds and exclusions unchanged.
File Description
.testcoverage.yml Removes the unsupported local-prefix option so go-test-coverage can parse the configuration under strict decoding.

Review effort: Balanced

@korylprince
korylprince merged commit 6d987d5 into macadmins:main Nov 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants