diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index e989ea8b..6f896a53 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -52,4 +52,26 @@ jobs:
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s functional
- name: Unit tests
- run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit
\ No newline at end of file
+ run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit
+
+ - name: Functional tests coverage
+ if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest'
+ run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit -x -e "--coverage-php=.Build/coverage/functional.cov"
+
+ - name: Unit tests coverage
+ if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest'
+ run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit -x -e "--coverage-php=.Build/coverage/unit.cov"
+
+ - name: Composer require phpunit/phpcov for merging the code coverage
+ if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest'
+ run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s composer require --dev phpunit/phpcov
+
+ - name: Merge coverage
+ if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest'
+ run: ./.Build/bin/phpcov merge --clover=build/logs/clover.xml .Build/coverage
+
+ - name: Upload coverage
+ if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest'
+ run: |
+ composer global require php-coveralls/php-coveralls
+ php-coveralls --coverage_clover=build/logs/clover.xml -v
\ No newline at end of file
diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh
index 98e5aada..25d68c27 100755
--- a/Build/Scripts/runTests.sh
+++ b/Build/Scripts/runTests.sh
@@ -277,15 +277,14 @@ if ! type "docker" >/dev/null 2>&1 && ! type "podman" >/dev/null 2>&1; then
fi
# Option defaults
-# @todo Consider to switch from cgl to help as default
-TEST_SUITE="cgl"
+TEST_SUITE="help"
TYPO3_VERSION="11"
EXTRA_TEST_OPTIONS=""
DATABASE_DRIVER=""
DBMS="sqlite"
DBMS_VERSION=""
PHP_VERSION="8.2"
-PHP_XDEBUG_ON=0
+PHP_XDEBUG_COVERAGE=0
PHP_XDEBUG_PORT=9003
CGLCHECK_DRY_RUN=0
CI_PARAMS="${CI_PARAMS:-}"
@@ -335,7 +334,7 @@ while getopts "a:b:d:i:s:p:e:t:xy:nhu" OPT; do
fi
;;
x)
- PHP_XDEBUG_ON=1
+ PHP_XDEBUG_COVERAGE=1
;;
y)
PHP_XDEBUG_PORT=${OPTARG}
@@ -438,12 +437,11 @@ else
CONTAINER_DOCS_PARAMS="${CONTAINER_INTERACTIVE} ${DOCS_PARAMS} --rm --network ${NETWORK} -v ${ROOT_DIR}:/project"
fi
-if [ ${PHP_XDEBUG_ON} -eq 0 ]; then
+if [ ${PHP_XDEBUG_COVERAGE} -eq 0 ]; then
XDEBUG_MODE="-e XDEBUG_MODE=off"
XDEBUG_CONFIG=" "
else
- XDEBUG_MODE="-e XDEBUG_MODE=debug -e XDEBUG_TRIGGER=foo"
- XDEBUG_CONFIG="client_port=${PHP_XDEBUG_PORT} client_host=${CONTAINER_HOST}"
+ XDEBUG_MODE="-e XDEBUG_MODE=coverage"
fi
# Suite execution
diff --git a/Build/phpunit/FunctionalTests.xml b/Build/phpunit/FunctionalTests.xml
index b1697832..187e406d 100644
--- a/Build/phpunit/FunctionalTests.xml
+++ b/Build/phpunit/FunctionalTests.xml
@@ -32,4 +32,9 @@
+
\ No newline at end of file
diff --git a/Build/phpunit/UnitTests.xml b/Build/phpunit/UnitTests.xml
index d282d28a..5fa5d826 100644
--- a/Build/phpunit/UnitTests.xml
+++ b/Build/phpunit/UnitTests.xml
@@ -29,4 +29,9 @@
+
\ No newline at end of file