AppVeyour can't upload coverage report

Hi there,

I have a project I setup a long time ago using AppVeyour and codecov.io. It is an open source project.

I’m having a very strange issue with no error message and a failed report in the end. Anyone had similar issues?

The AppVeyor build link is vcsparser 1.0.111 - AppVeyor

The report should be displayed at: Commit ⋅ ericlemes/vcsparser (codecov.io)

This is the bit of the yml to push the report
$env:PATH = ‘C:\msys64\usr\bin;’ + $env:PATH
Invoke-WebRequest -Uri ‘https://codecov.io/bash’ -OutFile codecov.sh
bash codecov.sh -f “coverage.xml” -t -v

I appreciate any help as my build is broken right now :frowning:

Hi @ericlemes, if you view the raw coverage report before uploading, it’s empty

<?xml version="1.0" encoding="utf-8"?>
<CoverageSession xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="4.7.922.0">
  <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="0" minCyclomaticComplexity="0" maxCrapScore="0" minCrapScore="0" visitedClasses="0" numClasses="0" visitedMethods="0" numMethods="0" />
  <Modules />
</CoverageSession>

There probably is an issue with how you are collecting coverage before the Codecov step.

Hi Tom,

Thanks, you were right. Something changed on AppVeyor environment and broke my coverage :frowning:

It took me some time, but actually is an OpenCover switch that needs to be -register:appveyor instead of -register:user.

After fixing that and getting a report (that is actually published), I’m still getting an exception on the CI, with no clear error message. Can you help me with that?

Regards

Eric

@ericlemes, I think this is a Windows-related issue. You are running

bash codecov.sh -v -f "coverage.xml" -t [REDACTED]

but Powershell doesn’t always place nicely here. You want to do

curl -s https://codecov.io/bash | bash -s - -v -f "coverage.xml" -t <token>