Skip to content
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

Use action for report generated by php-coveralls/php-coveralls #15

Open
Smolevich opened this issue Oct 17, 2019 · 7 comments
Open

Use action for report generated by php-coveralls/php-coveralls #15

Smolevich opened this issue Oct 17, 2019 · 7 comments

Comments

@Smolevich
Copy link

I try to use this action for php project
Report generated by php-coveralls/php-coveralls and has format xml
I add

- name: Coveralls Parallel
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.github_token }}
        path-to-lcov: ./clover.xml

Step was failed with error 'error from lcovParse: ' 'Failed to parse string'

@Smolevich
Copy link
Author

@nickmerwin, can you answer me?

@ad-m
Copy link

ad-m commented Oct 22, 2019

Similar issue for Python.

@teohhanhui
Copy link

For PHP, you can try https://github.com/cedx/coveralls.php

Example on GitHub Actions:

      - name: Upload coverage results to Coveralls
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          composer global require cedx/coveralls
          coveralls build/logs/phpunit/clover.xml

@s-weigand
Copy link

Would be nice to also have at least xml support.

@teohhanhui
Copy link

Would be nice to also have at least xml support.

I think this is what this issue is about. Clover XML format support.

@s-weigand
Copy link

In my case it is coverage.py, sadly the clients don't support gh actions yet.
But coveralls-python support json output, so you could basically shove the json payload into Coveralls GitHub Action.
But *.xml is the most common format I guess, also I can't find a tool that converts any format supported by coverage.py/pytest-cov to lcov.info .

@twinh
Copy link

twinh commented Jun 14, 2020

Hello, for PHP, You may try this:

https://github.com/twinh/php-coveralls#github-actions

Add a new step after phpunit generate coverage report.

- name: Upload coverage results to Coveralls
  env:
    COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: |
    composer global require twinh/php-coveralls
    php-coveralls --coverage_clover=build/logs/clover.xml -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants