From c7d0612c937d0b3fe66412e7cd2c6e81fc97dd4c Mon Sep 17 00:00:00 2001 From: Marvin Buchmann Date: Mon, 7 Oct 2024 10:04:36 +0200 Subject: [PATCH] Add coveralls --- .github/workflows/ci.yml | 17 ++++++++++++++--- build/.coveralls.yml | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 build/.coveralls.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b2fe06..67f8cdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,10 +54,21 @@ jobs: - name: CGL run: composer t3g:cgl - - name: Tests - run: composer t3g:test:php - - name: Git Status run: | git status git status | grep -q "nothing to commit, working tree clean" + + - name: Tests + run: | + php -dpcov.enabled=1 -dpcov.directory="." ./vendor/bin/phpunit -c build/phpunit.xml.dist --log-junit var/log/junit/phpunit.junit.xml --coverage-clover var/log/junit/coverage.xml --coverage-xml var/log/junit/coverage-xml/ + env: + COMPOSER_PROCESS_TIMEOUT: 1200 + + - name: Upload coverage results to Coveralls + continue-on-error: true + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls --no-progress --no-suggest --no-interaction + /home/runner/.composer/vendor/bin/php-coveralls -c build/.coveralls.yml -vvv --json_path=var/log/coveralls-upload.json diff --git a/build/.coveralls.yml b/build/.coveralls.yml new file mode 100644 index 0000000..f185e4b --- /dev/null +++ b/build/.coveralls.yml @@ -0,0 +1,2 @@ +coverage_clover: var/log/junit/coverage.xml +