microsoft / mu_devops

Project Mu Developer Operations
https://microsoft.github.io/mu/
Other
26 stars 22 forks source link

Multiple Updates to code coverage #277

Closed Javagedes closed 10 months ago

Javagedes commented 10 months ago

This PR contains multiple updates to code coverage when executed via MuDevOpsWrapper.yml

  1. Removed calculate_code_coverage - This was redundant, as coverage_publish_target could be used instead (by having it not set, or selecting codecov / ado
  2. Updates all usage of coverage_publish_target to be condition of a step, rather than used in a compile time expression for adding / removing steps. This is to support setting the parameter via pipeline variables. This has the unfortunate side effect of the steps always being present in the pipeline build, just skipped, which is not as clean as before.
  3. Updates ado code coverage uploads to be per-matrix-job by utilizing PublishCodeCoverageResults@2 which can merge code coverage results. This resolves #267
  4. Resolves #276 by passing the entire command to subprocess.Popen and passing shell=True to the same.
  5. Adds information to the base Readme on code coverage.

Build verifies uploading to codecov works as expected Build verifies uploading to ado works as expected Build verifies not specifying a coverage target works as expected

Breaking Change

calculate_code_coverage must be removed from any yaml file extending MuDevOpsWrapper.yml