New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coveralls reporting fails as it keeps throwing error Failed to parse string
#1610
Comments
Hi @jvkumar. Yes, that's the result you can expect if you pass an empty Here's why:
Then the errors that bubble up are the ones you see:
You might get different behavior if your file contained an empty, but fully formed, JSON object, like Can I ask why your If not, the fix would be to make sure |
@afinetooth thank you for your reply. Please see my notes below.
It is because pytest cov is can create coverage reports only in one of these formats -
As I said above, pytest doesn't produce coverage reports in |
@jvkumar I see. Yes, some languages use code coverage libraries that export their own format. In this case, in your shoes, I'd use a language integration specific to python, like one of these. Of those, coveralls-python is most used and well-maintained. The documentation for that integration has a section on using it with Github Actions. You'll also do well to check the issues for that project if you run into problems, as it's actively supported. There's also a Coveralls Python Github Action, but I'm not as familiar with it to make a recommendation. Maybe try those and let us know if you hit any issue you can't find a solution for those project's issue boards. |
Hey everyone. Bit late to the discussion. I used coverage-lcov to generate LCOV file. This is how I implemented for my python repo. |
I have the following configuration set up in my GH action. I have a Python flask app repo that uses pytest to run the test
- name: Coveralls GitHub Action uses: coverallsapp/github-action@1.1.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./coveralls/lcov.info
And I created an
empty file
./coveralls/lcov.info
as shown here https://share.getcloudapp.com/5zunyjmpOn GH action after successfully running all my tests, when it is time to send info to coveralls, I get these
May I know what am I doing wrong or any way to debug it to provide you more info in the troubleshooting or is it something wrong in coveralls?
btw, my test running commands are as follows (if that helps in troubleshooting) -
I also have a
.coveragerc
file on the root level, which containsThe text was updated successfully, but these errors were encountered: