diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a531540a..87f987f6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -73,3 +73,11 @@ jobs: - name: Test the code run: composer run coverage + + - name: Upload coverage results to Coveralls + if: matrix.php-versions == '8.0' + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=.coverage.xml --json_path=/tmp/coverage.json -v diff --git a/README.md b/README.md index aa724ce3..a0b76801 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ nano [![Latest Stable Version](http://poser.pugx.org/elecena/nano/v)](https://packagist.org/packages/elecena/nano) [![phpunit](https://github.com/elecena/nano/actions/workflows/tests.yaml/badge.svg)](https://github.com/elecena/nano/actions/workflows/tests.yaml) +[![Coverage Status](https://coveralls.io/repos/github/elecena/nano/badge.svg?branch=master)](https://coveralls.io/github/elecena/nano?branch=master) ==== ## Testing