Skip to content

enh: Make code coverage checks dynamic#194

Open
kofimokome wants to merge 1 commit intodevfrom
enh/code-coverage
Open

enh: Make code coverage checks dynamic#194
kofimokome wants to merge 1 commit intodevfrom
enh/code-coverage

Conversation

@kofimokome
Copy link
Copy Markdown
Collaborator

Depends on whilesmart/workflows#7

Fixes #175

@sourceant
Copy link
Copy Markdown

sourceant bot commented Mar 15, 2026

Code Review Summary

This PR migrates hardcoded code coverage logic into dynamic, shared GitHub Actions workflows. This centralizes the logic for maintaining coverage baselines.

🚀 Key Improvements

  • Replaced complex inline shell scripts in .github/workflows/tests.yml with a reusable action.
  • Updated actions/checkout to v5 across all modified workflows.
  • Introduced .github/coverage-baseline.json as a single source of truth for coverage thresholds.

💡 Minor Suggestions

  • Pin workflows to specific versions/tags instead of @main to avoid breaking changes.

Copy link
Copy Markdown

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

Copy link
Copy Markdown

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

Copy link
Copy Markdown

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

tools: composer

- name: Check Coverage
uses: whilesmart/workflows/php/coverage/update@main
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pinning to a specific version (e.g., @v1) instead of @main is recommended for production workflows to prevent unexpected breaking changes if the upstream repository updates.

Suggested change
uses: whilesmart/workflows/php/coverage/update@main
uses: whilesmart/workflows/php/coverage/update@v1

@kofimokome kofimokome requested a review from nfebe March 15, 2026 22:56
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.

enh: Update code coverage calculation to use statements covered instead of elements covered and make coverate update dynamic

1 participant