coverallsapp / github-action

Coveralls Github Action
https://github.com/marketplace/actions/coveralls-github-action
MIT License
468 stars 75 forks source link

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

Open Smolevich opened 5 years ago

Smolevich commented 5 years ago

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 commented 5 years ago

@nickmerwin, can you answer me?

ad-m commented 5 years ago

Similar issue for Python.

teohhanhui commented 4 years ago

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 commented 4 years ago

Would be nice to also have at least xml support.

teohhanhui commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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