From 0b3f945cd585c1f82bff14324306f6468d84190d Mon Sep 17 00:00:00 2001 From: Martin Georgiev Date: Tue, 19 Aug 2025 00:52:33 +0300 Subject: [PATCH 1/3] ci: rework coveralls upload for unit tests with parallel+finish events; add config for coverage for integration tests; unify coverage paths & remove now obsolete clover script --- .github/workflows/ci.yml | 18 +++++++++++++++--- ci/phpunit/config-integration.xml | 6 ++++++ ci/phpunit/config-unit.xml | 4 ++-- composer.json | 3 --- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bcb1e4c..8edb689b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,13 +113,25 @@ jobs: run: composer audit - name: Run unit test suite - run: composer run-unit-tests-with-clover + run: composer run-unit-tests - name: Upload coverage results to Coveralls if: matrix.calculate-code-coverage == true uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} + file: ./var/logs/test-coverage/unit/clover.xml + parallel: true + flag-name: "unit" fail-on-error: false - base-path: ./var/logs/test-coverage/ - flag-name: "PHP ${{ matrix.php }}" + + coveralls-finish: + needs: tests + if: always() + runs-on: ubuntu-latest + steps: + - name: Finalize Coveralls parallel run + uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/ci/phpunit/config-integration.xml b/ci/phpunit/config-integration.xml index 2a0df103..76e0cb5e 100644 --- a/ci/phpunit/config-integration.xml +++ b/ci/phpunit/config-integration.xml @@ -19,6 +19,12 @@ ../../tests/Integration + + + + + + ../../src diff --git a/ci/phpunit/config-unit.xml b/ci/phpunit/config-unit.xml index 75c360d0..32a7cb2d 100644 --- a/ci/phpunit/config-unit.xml +++ b/ci/phpunit/config-unit.xml @@ -21,8 +21,8 @@ - - + + diff --git a/composer.json b/composer.json index 38e9d07b..f28aa300 100644 --- a/composer.json +++ b/composer.json @@ -102,9 +102,6 @@ "run-unit-tests": [ "@phpunit:unit" ], - "run-unit-tests-with-clover": [ - "@phpunit:unit --coverage-clover=./var/logs/test-coverage/clover.xml" - ], "run-all-tests": [ "@run-unit-tests", "@run-integration-tests" From 6fe34507c3be2951af6f07ec814427efd6506b42 Mon Sep 17 00:00:00 2001 From: Martin Georgiev Date: Tue, 19 Aug 2025 00:58:32 +0300 Subject: [PATCH 2/3] no message --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8edb689b..d9ccd1d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} file: ./var/logs/test-coverage/unit/clover.xml parallel: true - flag-name: "unit" + flag-name: "Unit" fail-on-error: false coveralls-finish: From b28d6be177a9ce6d4f59c1db69b52875ac977614 Mon Sep 17 00:00:00 2001 From: Martin Georgiev Date: Tue, 19 Aug 2025 01:03:21 +0300 Subject: [PATCH 3/3] no message --- .scrutinizer.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index fc411df6..627db6b8 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -8,9 +8,9 @@ build: tests: override: - php-scrutinizer-run - - command: composer run-unit-tests-with-clover + - command: composer run-unit-tests coverage: - file: var/logs/test-coverage/clover.xml + file: var/logs/test-coverage/unit/clover.xml format: clover dependencies: