From b3677d17887629508acef0117f76188393666516 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Fri, 16 Oct 2026 14:26:36 +0200 Subject: [PATCH] collect code coverage of the client in unit tests --- .github/workflows/tests.yaml | 8 ++++---- phpunit.xml.dist | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 41fe2e3..099bbc2 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -27,7 +27,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: curl, json, mbstring - coverage: none + coverage: pcov tools: composer:v2 - name: Set composer cache directory @@ -46,10 +46,10 @@ jobs: - name: Install composer dependencies run: composer install --no-interaction --prefer-dist --no-progress - - name: Run phpunit unit tests - run: vendor/bin/phpunit --testsuite=unit --colors=always --testdox + - name: Run phpunit unit tests with coverage + run: vendor/bin/phpunit --testsuite=unit --colors=always --testdox --coverage-clover=coverage.xml - # integration tests send requests to the live Hangar API, + # integration tests send requests to the live Hangar API and need the HANGAR_API_KEY secret, # so they only run on the master branch and when started manually integration-tests: if: github.event_name != 'pull_request' diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 141aab0..8bf5c02 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,7 @@ - tests/Unit + tests/Unit/Client - tests/Integration + tests/Integration/Client - src/ + src/Client