www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Uploading coverage to Codecov doesn't work

reply Mitacha <mateusz.mitaszka gmail.com> writes:
Hello there,

I've been trying to setup bitbucket pipelines to submit coverage 
to codecov, but with no luck.
I use `dub run -b unittest-cov` and it generates .lst files 
correctly, then `bash <(curl -s https://codecov.io/bash) -t 
$CODECOV_TOKEN` is called, but all I get is:

```
==> Bitbucket detected.
     project root: .
     Yaml not found, that's ok! Learn more at 
http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
     + .
--> No coverage report found.
     Please visit http://docs.codecov.io/docs/supported-languages
```
No reports were uploaded.

The thing I'm concerned about is "--> No coverage report found.". 
I checked and token is supplied. I ran same commands locally and 
get same result.

Is there some magic configuration in yaml file necessary, to make 
that work?
Jul 08 2020
next sibling parent user1234 <user1234 12.de> writes:
On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
 Hello there,

 I've been trying to setup bitbucket pipelines to submit 
 coverage to codecov, but with no luck.
 I use `dub run -b unittest-cov` and it generates .lst files 
 correctly, then `bash <(curl -s https://codecov.io/bash) -t 
 $CODECOV_TOKEN` is called, but all I get is:

 ```
 ==> Bitbucket detected.
     project root: .
     Yaml not found, that's ok! Learn more at 
 http://docs.codecov.io/docs/codecov-yaml
 ==> Running gcov in . (disable via -X gcov)
 ==> Python coveragepy not found
 ==> Searching for coverage reports in:
     + .
 --> No coverage report found.
     Please visit http://docs.codecov.io/docs/supported-languages
 ```
 No reports were uploaded.

 The thing I'm concerned about is "--> No coverage report 
 found.". I checked and token is supplied. I ran same commands 
 locally and get same result.

 Is there some magic configuration in yaml file necessary, to 
 make that work?
You may have to specify the folder where the lst files are created. THis is done in the config file. Once I had to do this because I used https://dlang.org/phobos/core_runtime.html#.dmd_coverDestPath.
Jul 08 2020
prev sibling parent reply Basile B. <b2.temp gmx.com> writes:
On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
 Hello there,

 I've been trying to setup bitbucket pipelines to submit 
 coverage to codecov, but with no luck.
 I use `dub run -b unittest-cov` and it generates .lst files 
 correctly, then `bash <(curl -s https://codecov.io/bash) -t 
 $CODECOV_TOKEN` is called, but all I get is:

 ```
 ==> Bitbucket detected.
     project root: .
     Yaml not found, that's ok! Learn more at 
 http://docs.codecov.io/docs/codecov-yaml
 ==> Running gcov in . (disable via -X gcov)
 ==> Python coveragepy not found
 ==> Searching for coverage reports in:
     + .
 --> No coverage report found.
     Please visit http://docs.codecov.io/docs/supported-languages
 ```
 No reports were uploaded.

 The thing I'm concerned about is "--> No coverage report 
 found.". I checked and token is supplied. I ran same commands 
 locally and get same result.

 Is there some magic configuration in yaml file necessary, to 
 make that work?
It's broken for me too, on gitlab,... --- GitLab CI detected. project root: . --> token set from env Yaml found at: ./.codecov.yml ==> Running gcov in . (disable via -X gcov) ==> Python coveragepy not found ==> Searching for coverage reports in: + . --> No coverage report found. Please visit http://docs.codecov.io/docs/supported-languages --- That used to work perfectly. Note that it's broken for DMD test suite too.
Jul 11 2020
parent reply Mitacha <mateusz.mitaszka gmail.com> writes:
On Saturday, 11 July 2020 at 09:43:39 UTC, Basile B. wrote:
 On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
 [...]
It's broken for me too, on gitlab,... --- GitLab CI detected. project root: . --> token set from env Yaml found at: ./.codecov.yml ==> Running gcov in . (disable via -X gcov) ==> Python coveragepy not found ==> Searching for coverage reports in: + . --> No coverage report found. Please visit http://docs.codecov.io/docs/supported-languages --- That used to work perfectly. Note that it's broken for DMD test suite too.
I filed an issue on codecov community forum https://community.codecov.io/t/uploading-d-lang-coverage-doesnt-work/1740 So hopefully, someone will look at this.
Jul 14 2020
parent reply Basile B. <b2.temp gmx.com> writes:
On Tuesday, 14 July 2020 at 11:05:17 UTC, Mitacha wrote:
 On Saturday, 11 July 2020 at 09:43:39 UTC, Basile B. wrote:
 On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
I filed an issue on codecov community forum https://community.codecov.io/t/uploading-d-lang-coverage-doesnt-work/1740 So hopefully, someone will look at this.
Bookmarked. Thanks much for taking the time to register on their forums, I didn't want to.
Jul 14 2020
parent Basile B. <b2.temp gmx.com> writes:
On Tuesday, 14 July 2020 at 17:52:25 UTC, Basile B. wrote:
 On Tuesday, 14 July 2020 at 11:05:17 UTC, Mitacha wrote:
 On Saturday, 11 July 2020 at 09:43:39 UTC, Basile B. wrote:
 On Wednesday, 8 July 2020 at 15:55:58 UTC, Mitacha wrote:
I filed an issue on codecov community forum https://community.codecov.io/t/uploading-d-lang-coverage-doesnt-work/1740 So hopefully, someone will look at this.
Bookmarked. Thanks much for taking the time to register on their forums, I didn't want to.
Forgot to say. In my case I suspect that this is caused by a force push, like here https://community.codecov.io/t/force-push-intermittently-leads-to-codecov-n t-updating-pr/68/2. But a problem can hide another I might be afected by this one plus the same as you, who knows.
Jul 14 2020