Skip to content

Fix Code Coverage Tests#2928

Merged
JimBobSquarePants merged 2 commits into
mainfrom
js/fix-codecov-ci
May 30, 2025
Merged

Fix Code Coverage Tests#2928
JimBobSquarePants merged 2 commits into
mainfrom
js/fix-codecov-ci

Conversation

@JimBobSquarePants
Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Our code coverage CI build was failing due to an introduced reliance on DebugSaveXX working correctly in all build environments.

Since we no longer run the coverage tests against PRs directly it's best just to remove the condition.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes failing code coverage tests by removing a conditional block that bypassed image saving when running under code coverage.

  • Removed early return conditions checking TestEnvironment.RunsWithCodeCoverage in DebugSave and DebugSaveMultiFrame methods.
  • Updated using statement syntax to the newer declaration style for improved consistency.
Comments suppressed due to low confidence (2)

tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs:292

  • Confirm that the new using declaration syntax is supported in your project's targeted C# version and applied consistently across the codebase.
using Image<TPixel> debugImage = GetDebugOutputImageMultiFrame<TPixel>(...

tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs:300

  • Ensure that the updated using declaration style is consistently used for resource management throughout the repository to avoid style discrepancies.
using Image<TPixel> referenceImage = GetReferenceOutputImageMultiFrame<TPixel>(...

@JimBobSquarePants JimBobSquarePants merged commit 4b29744 into main May 30, 2025
8 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/fix-codecov-ci branch May 30, 2025 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants