From 74ffbd50e5da7499fa58de596a9024b6cf581621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 16 Dec 2021 16:09:06 +0100 Subject: [PATCH] Add Coveralls to GitHub Actions workflow Based on: https://github.com/php-coveralls/php-coveralls#github-actions --- .github/workflows/phpunit.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 556e105..094f89e 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -23,7 +23,6 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - coverage: none extensions: gmp, bcmath tools: composer - uses: actions/checkout@v2 @@ -32,4 +31,10 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - run: composer install - - run: vendor/bin/phpunit + - run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v