Skip to content

Overhaul Coverage Flags#121

Merged
leogdion merged 3 commits intov0.8.1from
fix/ci-coverage-flags-overhaul
Feb 5, 2026
Merged

Overhaul Coverage Flags#121
leogdion merged 3 commits intov0.8.1from
fix/ci-coverage-flags-overhaul

Conversation

@leogdion
Copy link
Member

@leogdion leogdion commented Feb 5, 2026

No description provided.

leogdion and others added 3 commits February 4, 2026 08:30
- Standardize flags to include OS, OS version, Swift version
- Add Xcode version to Apple platform builds
- Add coverage upload to Android builds
- Use comma-separated format for all flags
- Enable better coverage filtering in Codecov

Flag examples:
- Ubuntu: ubuntu,ubuntu-noble,swift-6.2
- WASM: ubuntu,ubuntu-noble,swift-6.2,wasm
- macOS SPM: macos,macos-14,swift-5.10,xcode-15.4
- iOS: ios,ios-18.6,swift-6.1,xcode-16.4
- Windows: windows,windows-2022,swift-6.1
- Android: android,android-api-28,swift-6.1

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ci-coverage-flags-overhaul

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.65%. Comparing base (e702d57) to head (a06141c).
⚠️ Report is 1 commits behind head on v0.8.1.

Additional details and impacted files
@@           Coverage Diff           @@
##           v0.8.1     #121   +/-   ##
=======================================
  Coverage   77.65%   77.65%           
=======================================
  Files          74       74           
  Lines        1553     1553           
=======================================
  Hits         1206     1206           
  Misses        347      347           
Flag Coverage Δ
macos 76.94% <ø> (?)
macos-14 65.35% <ø> (?)
macos-15 76.88% <ø> (?)
macos-26 76.88% <ø> (?)
spm ?
swift-5.10 66.06% <ø> (ø)
swift-6.0 76.88% <ø> (ø)
swift-6.1 76.88% <ø> (ø)
swift-6.1.2 76.88% <ø> (?)
swift-6.2 76.88% <ø> (ø)
swift-6.2.1 76.88% <ø> (?)
swift-6.2.3 76.88% <ø> (?)
swift-6.3 ?
swift-6.3-nightly 76.88% <ø> (?)
ubuntu 77.65% <ø> (ø)
ubuntu-jammy 77.65% <ø> (?)
ubuntu-noble 77.65% <ø> (?)
xcode-15.4. 65.35% <ø> (?)
xcode-16.4. 76.88% <ø> (?)
xcode-26.0. 76.88% <ø> (?)
xcode-26.1. 76.88% <ø> (?)
xcode-26.2. 76.88% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude
Copy link

claude bot commented Feb 5, 2026

Pull Request Review: Overhaul Coverage Flags

I have reviewed the changes in this PR which updates the GitHub Actions workflow to improve coverage flag organization and consistency across platforms.

Positive Changes

1. Action Version Update
Upgrading from brightdigit/swift-build v1.5.0-beta.2 to v1.5.0 is excellent - moving from beta to stable release improves reliability.

2. Coverage Flag Consistency
The new flag structure provides much better organization across platforms with hierarchical approach allowing better coverage filtering and analysis in Codecov.

3. Android Coverage Addition
Adding coverage reporting for Android builds fills a previous gap - this is a significant improvement.

4. Dynamic Flag Generation
The new Set coverage flags steps for macOS and Windows extract version information dynamically rather than hardcoding making it more maintainable.

Potential Issues

1. Sed Expression Robustness
The regex patterns at lines 289, 292, 362 may not handle edge cases. The Xcode and Swift version extraction might fail with unusual version formats or pre-release versions.

2. Platform Logic
The PLATFORM variable at line 298 defaults to macos when matrix.type is empty. Lines 89-107 have no type field while lines 109-132 have explicit type: macos. Are SPM builds being tagged as macos when they should be tagged as spm? This could lead to coverage data being misclassified.

3. Critical Bug in macOS Flag Logic
Entries with type: macos but no osVersion will fall through to the else branch and be tagged with runner macOS version instead of the target OS. This creates inconsistent tagging.

Example: Line 111-112 with type: macos, runs-on: macos-14

  • Current output: macos,macos-14,swift-X,xcode-X
  • Should output: macos,swift-X,xcode-X

The condition at line 301 should check both type and osVersion to handle this properly.

Recommendations

  1. Must fix: Correct the macOS flag logic to handle type: macos without osVersion
  2. Should fix: Make sed expressions more robust against version format changes
  3. Consider: Clarify SPM vs macOS builds in the matrix
  4. Nice to have: Add validation step to verify flag format

Overall Assessment

This is a valuable improvement that brings consistency to coverage reporting. The core concept is sound but there are implementation bugs that need fixing before merge particularly around macOS flag generation.

Recommendation: Request changes to fix the flag logic bug then approve after verification.

@leogdion leogdion marked this pull request as ready for review February 5, 2026 17:11
@leogdion leogdion merged commit 8dd9a97 into v0.8.1 Feb 5, 2026
57 checks passed
@leogdion leogdion deleted the fix/ci-coverage-flags-overhaul branch February 5, 2026 17:12
leogdion added a commit that referenced this pull request Feb 5, 2026
* Adding WASM Support (#114)
* Update swift-build action to version 1.5.0 (#120)
* Overhaul Coverage Flags (#121)
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.

1 participant