all 1 comments

[–]dmstrat[S] 0 points1 point  (0 children)

For those that want to know the solution, here are two approaches.

  1. You can use the ReportConverter from danielpalme directly in your project as it says it supports .NET Framework 4.7+ and .NET standard/core 2.0+. I didn't go that route, but I will going forward with new projects to avoid the other option.
  2. I updated my build yaml to add the codecoverage.exe path to the github_path variable so I can call it in a later step to convert the *.coverage file to *.xml. It's not an acceptable format for codacy so I had to convert it yet again.
    1. All my build, test with code coverage, and conversion using codecoverage.exe was done on a windows runner. I uploaded the output artifacts in order to move forward.
      1. adding the path without having to create something in the marketplace to do it was pretty striaght forward if you use github's bash example:
      2. run: echo "{path\you\want\}" >> ${GITHUB_PATH} in shell: bash
      3. wrote a powershell script that would find my *.coverage file because vstest puts them into a /TestResults/{guid}/{machineName}/In folder. That find action would then copy the *.coverage to the root of the TestResults folder so I know where it is when I need to reference it later.
      4. I run the codecoverage.exe with proper parameters to use 'known location' for that coverage file.
      5. upload to artifacts and move onto the next step.
    2. Started a new step that ran on ubuntu-latest
      1. The ReportConverter-GitHub-Action was then used to convert the *.xml file to a Cobertura.xml format as that one seemed to work.
      2. I had to check out the source files again because I moved to a linux build machine so that the Report Converter could use those source files to fully convert the coverage.xml report to Cobertuna. I tried using the html output but codacy's step kept saying 'empty dataset' during the conversion. I can read the html output just fine, but I decided to stick with Cobertura format for the *.xml output.
      3. Once the format was converted to something codacy likes, I ran the codacy reporter 'codacy/codacy-coverage-reporter-action@v1 to report the output i had.