github-action
github-action copied to clipboard
Use action for report generated by php-coveralls/php-coveralls
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'
@nickmerwin, can you answer me?
Similar issue for Python.
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
Would be nice to also have at least xml support.
Would be nice to also have at least xml support.
I think this is what this issue is about. Clover XML format support.
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
.
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