Description
Uploading D lang coverage via bash uploader doesn’t work
CI/CD
Bitbucket pipelines
Uploader
bash <(curl -s https://codecov.io/bash ) -t $CODECOV_TOKEN
Codecov Output
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _
|/ _ / __/ _ \ \ / /`
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-20200629-ffaf297
``
``
==> 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
``
``
Steps to Reproduce
Run dub test -b unittest-cov
Run bash <(curl -s https://codecov.io/bash ) -t $CODECOV_TOKEN
Expected behavior:
All lst files are recogized and coverage is uploaded.
Actual behavior:
Even though .lst files are created in . directory they aren’t picked by uploader.
Flakiness? All the time
tom
July 13, 2020, 9:18pm
2
Hi @Mitacha , looks like you don’t have an accessible coverage file being uploaded. Can you try using the -f parameter to specify the filepath?
I tried adding -f
, but it didn’t help, then I created ‘coverage’ directory and moved all .lst
coverage files. After running uploader with -s covarage/*.lst
I got:
==> Searching for coverage reports in:
All my coverage files :)
...
--> No coverage report found.
Please visit http://docs.codecov.io/docs/supported-languages
All files are found correctly, but nothing is uploaded
tom
July 14, 2020, 2:32pm
4
Interesting @Mitacha , would you be able to produce the entire Codecov output? Also, I noticed in the original post that you are using an older version of the bash script. Could this be cached somehow?
I ran dub run -b unittest-cov -- --DRT-covopt="dstpath:coverage"
to output .lst files to coverage
directory and then bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -s 'coverage/*.lst
This is full output from my local machine:
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-20200707-353aa93
x> No CI provider detected.
Testing inside Docker? http://docs.codecov.io/docs/testing-with-docker
Testing with Tox? https://docs.codecov.io/docs/python#section-testing-with-tox
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:
+ coverage/source-app.lst
+ coverage/source-ast-creators.lst
+ coverage/source-ast-expression.lst
+ coverage/source-ast-functions-declarations.lst
+ coverage/source-ast-functions-package.lst
+ coverage/source-ast-functions-registry.lst
+ coverage/source-ast-functions-validation.lst
+ coverage/source-ast-node.lst
+ coverage/source-ast-package.lst
+ coverage/source-ast-statement.lst
+ coverage/source-ast-testing-mock.lst
+ coverage/source-ast-testing-values.lst
+ coverage/source-visitor-eval.lst
+ coverage/source-visitor-package.lst
+ coverage/source-visitor-print.lst
+ coverage/source-visitor-typing.lst
+ coverage/source-visitor-validation.lst
--> No coverage report found.
Please visit http://docs.codecov.io/docs/supported-languages
This is full output from bitbucket:
+ bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -s 'coverage/*.lst'
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-20200707-353aa93
==> 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:
+ coverage/-home-circleci-.dub-packages-bolts-0.11.1-bolts-source-bolts-package.lst
+ coverage/-home-circleci-.dub-packages-optional-0.12.0-optional-source-optional-optional.lst
+ coverage/-home-circleci-.dub-packages-optional-0.12.0-optional-source-optional-package.lst
+ coverage/-home-circleci-.dub-packages-sumtype-0.8.13-sumtype-src-sumtype.lst
+ coverage/source-app.lst
+ coverage/source-ast-creators.lst
+ coverage/source-ast-expression.lst
+ coverage/source-ast-functions-declarations.lst
+ coverage/source-ast-functions-package.lst
+ coverage/source-ast-functions-registry.lst
+ coverage/source-ast-functions-validation.lst
+ coverage/source-ast-node.lst
+ coverage/source-ast-package.lst
+ coverage/source-ast-statement.lst
+ coverage/source-ast-testing-mock.lst
+ coverage/source-ast-testing-values.lst
+ coverage/source-visitor-eval.lst
+ coverage/source-visitor-package.lst
+ coverage/source-visitor-print.lst
+ coverage/source-visitor-typing.lst
+ coverage/source-visitor-validation.lst
--> No coverage report found.
Please visit http://docs.codecov.io/docs/supported-languages
tom
July 15, 2020, 2:39pm
6
Hi @Mitacha , thanks for your patience here. It looks like we explicitly exclude *.lst
files. Would it be possible to rename them to *.txt
or similar?
Would it be possible to rename them to *.txt
or similar?
Well, yes and no . I ran renaming before using uploader:
dub run -b unittest-cov -- --DRT-covopt="dstpath:coverage"
for f in coverage/*.lst; do mv -- "$f" "${f%.lst}.txt"; done
bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -s 'coverage/*.txt'
+ bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -s 'coverage/*.txt'
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-20200707-353aa93
==> 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:
+ coverage/-home-circleci-.dub-packages-bolts-0.11.1-bolts-source-bolts-package.txt
+ coverage/-home-circleci-.dub-packages-optional-0.12.0-optional-source-optional-optional.txt
+ coverage/-home-circleci-.dub-packages-optional-0.12.0-optional-source-optional-package.txt
+ coverage/-home-circleci-.dub-packages-sumtype-0.8.13-sumtype-src-sumtype.txt
+ coverage/source-app.txt
+ coverage/source-ast-creators.txt
+ coverage/source-ast-expression.txt
+ coverage/source-ast-functions-declarations.txt
+ coverage/source-ast-functions-package.txt
+ coverage/source-ast-functions-registry.txt
+ coverage/source-ast-functions-validation.txt
+ coverage/source-ast-node.txt
+ coverage/source-ast-package.txt
+ coverage/source-ast-statement.txt
+ coverage/source-ast-testing-mock.txt
+ coverage/source-ast-testing-values.txt
+ coverage/source-visitor-eval.txt
+ coverage/source-visitor-package.txt
+ coverage/source-visitor-print.txt
+ coverage/source-visitor-typing.txt
+ coverage/source-visitor-validation.txt
--> No coverage report found.
Please visit http://docs.codecov.io/docs/supported-languages
Looks like renaming didn’t help. I’m surprised that *.lst
files are excluded, taking into account that they are produced by all D compilers during code coverage analysis. I think even if it helped, renaming should be consider temporary workaround, because D is listed as supported language and official example doesn’t say anything about renaming (GitHub - codecov/example-d: Example repository for D and Codecov ).
tom
July 16, 2020, 2:52pm
8
@Mitacha , the PR is here . I’ll update here when it’s been merged and when it’s been deployed.
tom
July 17, 2020, 12:06pm
9
@Mitacha , the PR has been merged
@tom Thank you so much for your support. I look forward to try your changes
tom
July 31, 2020, 5:02am
11
Hi @Mitacha , the PR has been deployed. Let me know if you run into any other issues.
@tom I checked and everything works fine! Thank you very much for your support