Skip to content

Conversation

@nicholas-maltbie
Copy link
Contributor

Changes

Added the dontClear flag to the default code coverage options.

As of version 1.2.0 of the CodeCoverage package, you need to use the dontClear flag to allow combining test results.

Add this to allow coverage results to be accumulated after every code coverage session. If not passed the results are cleared before a new session. For more information see Generate combined report from EditMode and PlayMode tests.

Will make a corresponding change to the documentation as well if this change works.

Tested this flag locally with my own repo - nicholas-maltbie/OpenKCC#110

Checklist

  • Read the contribution guide and accept the code of conduct
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)

@github-actions
Copy link

github-actions bot commented Dec 3, 2022

Cat Gif

Copy link
Member

@webbertakken webbertakken left a comment

Choose a reason for hiding this comment

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

Cool. LGTM

Just let me know if it works for you and whether this breaks any existing flows from other users.

@nicholas-maltbie
Copy link
Contributor Author

Cool. LGTM

Just let me know if it works for you and whether this breaks any existing flows from other users.

Yep, fixed the error where one test was overwriting previous tests. Users that use an older version of code coverage or test runner will ignore the flag. it works as expected in older versions, but the newer version released this year broke the workflow without the extra flag :(

@webbertakken webbertakken merged commit be0f55d into game-ci:main Dec 4, 2022
@webbertakken
Copy link
Member

Awesome! Thanks.

@webbertakken
Copy link
Member

Released in https://github.com/game-ci/unity-test-runner/releases/tag/v2.1.1

@nicholas-maltbie nicholas-maltbie deleted the nickmaltbie/dontclear-coverage-flag branch December 4, 2022 01:58
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.

2 participants