github-action icon indicating copy to clipboard operation
github-action copied to clipboard

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

Open Smolevich opened this issue 5 years ago • 7 comments

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 avatar Oct 17 '19 21:10 Smolevich

@nickmerwin, can you answer me?

Smolevich avatar Oct 21 '19 06:10 Smolevich

Similar issue for Python.

ad-m avatar Oct 22 '19 00:10 ad-m

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

teohhanhui avatar Oct 25 '19 15:10 teohhanhui

Would be nice to also have at least xml support.

s-weigand avatar Nov 14 '19 19:11 s-weigand

Would be nice to also have at least xml support.

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

teohhanhui avatar Nov 14 '19 19:11 teohhanhui

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 .

s-weigand avatar Nov 14 '19 19:11 s-weigand

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

twinh avatar Jun 14 '20 10:06 twinh