Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches:
- main
- 4.0
- typo3-v14
pull_request:
permissions:
contents: read
Expand Down Expand Up @@ -69,7 +69,6 @@ jobs:
- "php:csfix"
- "php:sniff"
- "ts:lint"
- "xliff:lint"
php-version:
- "8.2"
- "8.3"
Expand Down Expand Up @@ -115,16 +114,16 @@ jobs:
fail-fast: false
matrix:
include:
- typo3-version: "^13.4"
- typo3-version: "^14.0"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^13.4"
- typo3-version: "^14.0"
php-version: "8.3"
composer-dependencies: highest
- typo3-version: "^13.4"
- typo3-version: "^14.0"
php-version: "8.4"
composer-dependencies: highest
- typo3-version: "^13.4"
- typo3-version: "^14.0"
php-version: "8.5"
composer-dependencies: highest
functional-tests:
Expand All @@ -143,25 +142,25 @@ jobs:
uses: actions/checkout@v4

- name: Install testing system
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -s ${{ matrix.composerInstall }}
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -s ${{ matrix.composerInstall }}

- name: Functional Tests with mariadb (min)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.4 -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mariadb -i 10.4 -s functional

- name: Functional Tests with mariadb (max)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional

- name: Functional Tests with mysql (min)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mysql -i 8.0 -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mysql -i 8.0 -s functional

- name: Functional Tests with mysql (max)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mysql -i 8.4 -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d mysql -i 8.4 -s functional

- name: Functional Tests with postgres (min)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 10 -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d postgres -i 10 -s functional

- name: Functional Tests with postgres (max)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 18 -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d postgres -i 18 -s functional

- name: Functional Tests with sqlite
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d sqlite -s functional
run: Build/Scripts/runTests.sh -t 14 -p ${{ matrix.php }} -d sqlite -s functional
97 changes: 38 additions & 59 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ handleDbmsOptions() {
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
exit 1
fi
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.2"
if ! [[ ${DBMS_VERSION} =~ ^(10.2|10.3|10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1|11.4|11.8)$ ]]; then
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10.11"
if ! [[ ${DBMS_VERSION} =~ ^(10.4|10.5|10.6|10.7|10.8|10.9|10.10|10.11|11.0|11.1|11.4|11.8)$ ]]; then
echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2
echo >&2
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
Expand All @@ -61,8 +61,8 @@ handleDbmsOptions() {
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
exit 1
fi
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="5.5"
if ! [[ ${DBMS_VERSION} =~ ^(5.5|5.6|5.7|8.0|8.4)$ ]]; then
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="8.4"
if ! [[ ${DBMS_VERSION} =~ ^(8.0|8.1|8.2|8.3|8.4|9.5)$ ]]; then
echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2
echo >&2
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
Expand All @@ -76,7 +76,7 @@ handleDbmsOptions() {
echo "Use \".Build/Scripts/runTests.sh -h\" to display help and valid options" >&2
exit 1
fi
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="10"
[ -z "${DBMS_VERSION}" ] && DBMS_VERSION="16"
if ! [[ ${DBMS_VERSION} =~ ^(10|11|12|13|14|15|16|17|18)$ ]]; then
echo "Invalid combination -d ${DBMS} -i ${DBMS_VERSION}" >&2
echo >&2
Expand Down Expand Up @@ -151,7 +151,7 @@ restoreComposerFiles() {

loadHelp() {
# Load help text into $HELP
read -r -d '' HELP <<EOF
read -r -d '' HELP <<'EOF'
TYPO3 core test runner. Execute unit, functional and other test suites in
a container based test environment. Handles execution of single test files,
sending xdebug information to a local IDE and more.
Expand Down Expand Up @@ -200,28 +200,23 @@ Options:
-i version
Specify a specific database version
With "-d mariadb":
- 10.2 short-term, maintained until 2023-05-25 (default)
- 10.3 short-term, maintained until 2023-05-25
- 10.4 short-term, maintained until 2024-06-18
- 10.5 short-term, maintained until 2025-06-24
- 10.6 long-term, maintained until 2026-06
- 10.7 short-term, no longer maintained
- 10.8 short-term, maintained until 2023-05
- 10.9 short-term, maintained until 2023-08
- 10.10 short-term, maintained until 2023-11
- 10.11 long-term, maintained until 2028-02
- 10.11 long-term, maintained until 2028-02 (default)
- 11.0 development series
- 11.1 short-term development series
- 11.4 long-term, maintained until 2033-01
- 11.8 long-term, maintained until 2033-10
With "-d mysql":
- 5.5 unmaintained since 2018-12 (default)
- 5.6 unmaintained since 2021-02
- 5.7 maintained until 2023-10
- 8.0 maintained until 2026-04
- 8.4 long-term, maintained until 2032-30
- 8.0 long-term, maintained until 2026-04
- 8.4 long-term, maintained until 2032-30
With "-d postgres":
- 10 unmaintained since 2022-11-10 (default)
- 10 unmaintained since 2022-11-10
- 11 unmaintained since 2023-11-09
- 12 maintained until 2024-11-14
- 13 maintained until 2025-11-13
Expand All @@ -231,22 +226,18 @@ Options:
- 17 maintained until 2029-11-08
- 18 maintained until 2029-11-14

-t <11|12|13>
-t <13>
Only with -s composerInstall|composerInstallMin|composerInstallMax
Specifies the TYPO3 CORE Version to be used
- 11.5: use TYPO3 v11 (default)
- 12.4: use TYPO3 v12
- 13.4: use TYPO3 v13
- 13.4: use TYPO3 v13 (default)
- 14.0: use TYPO3 v14

-p <7.4|8.0|8.1|8.2|8.3|8.4|8.5>
-p <8.2|8.3|8.4|8.5>
Specifies the PHP minor version to be used
- 7.4: use PHP 7.4 (default)
- 8.0: use PHP 8.0
- 8.1: use PHP 8.1
- 8.2: use PHP 8.2
- 8.3: use PHP 8.3
- 8.3: use PHP 8.3 (default)
- 8.4: use PHP 8.4
- 8.5: use PHP 8.5
- 8.5: use PHP 8.5

-e "<phpunit options>"
Only with -s docsGenerate|functional|unit
Expand Down Expand Up @@ -283,24 +274,24 @@ Options:
Show this help.

Examples:
# Run all core unit tests using PHP 7.4
# Run all core unit tests using PHP 8.5
./Build/Scripts/runTests.sh -s unit

# Run all core units tests and enable xdebug (have a PhpStorm listening on port 9003!)
./Build/Scripts/runTests.sh -x -s unit

# Run unit tests in phpunit verbose mode with xdebug on PHP 8.1 and filter for test canRetrieveValueWithGP
./Build/Scripts/runTests.sh -x -p 8.1 -- --filter 'classCanBeRegistered'
# Run unit tests in phpunit verbose mode with xdebug on PHP 8.3 and filter for test canRetrieveValueWithGP
./Build/Scripts/runTests.sh -x -p 8.3 -- --filter 'classCanBeRegistered'

# Run functional tests in phpunit with a filtered test method name in a specified file
# example will currently execute two tests, both of which start with the search term
./Build/Scripts/runTests.sh -s functional -- --filter 'findRecordByImportSource' Tests/Functional/Repository/CategoryRepositoryTest.php

# Run functional tests on postgres with xdebug, php 8.1 and execute a restricted set of tests
./Build/Scripts/runTests.sh -x -p 8.1 -s functional -d postgres -- Tests/Functional/Repository/CategoryRepositoryTest.php
# Run functional tests on postgres with xdebug, php 8.3 and execute a restricted set of tests
./Build/Scripts/runTests.sh -x -p 8.3 -s functional -d postgres -- Tests/Functional/Repository/CategoryRepositoryTest.php

# Run functional tests on postgres 11
./Build/Scripts/runTests.sh -s functional -d postgres -i 11
# Run functional tests on postgres 16
./Build/Scripts/runTests.sh -s functional -d postgres -i 16
EOF
}

Expand All @@ -319,17 +310,17 @@ ROOT_DIR="${PWD}"

# Option defaults
TEST_SUITE=""
TYPO3_VERSION="11"
TYPO3_VERSION="14"
DBMS="sqlite"
DBMS_VERSION=""
PHP_VERSION="8.1"
PHP_VERSION="8.3"
PHP_XDEBUG_ON=0
PHP_XDEBUG_PORT=9003
EXTRA_TEST_OPTIONS=""
CGLCHECK_DRY_RUN=0
DATABASE_DRIVER=""
CONTAINER_BIN=""
COMPOSER_ROOT_VERSION="12.4.2"
COMPOSER_ROOT_VERSION="14.0.1"
CONTAINER_INTERACTIVE="-it --init"
HOST_UID=$(id -u)
HOST_PID=$(id -g)
Expand Down Expand Up @@ -369,7 +360,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:nhu" OPT; do
;;
p)
PHP_VERSION=${OPTARG}
if ! [[ ${PHP_VERSION} =~ ^(7.4|8.0|8.1|8.2|8.3|8.4|8.5)$ ]]; then
if ! [[ ${PHP_VERSION} =~ ^(8.2|8.3|8.4|8.5)$ ]]; then
INVALID_OPTIONS+=("-p ${OPTARG}")
fi
;;
Expand All @@ -378,7 +369,7 @@ while getopts "a:b:s:d:i:p:e:t:xy:nhu" OPT; do
;;
t)
TYPO3_VERSION=${OPTARG}
if ! [[ ${TYPO3_VERSION} =~ ^(11|12|13)$ ]]; then
if ! [[ ${TYPO3_VERSION} =~ ^(14)$ ]]; then
INVALID_OPTIONS+=("-t ${OPTARG}")
fi
;;
Expand Down Expand Up @@ -451,7 +442,7 @@ mkdir -p .cache
mkdir -p .Build/public/typo3temp/var/tests

IMAGE_PHP="ghcr.io/typo3/core-testing-$(echo "php${PHP_VERSION}" | sed -e 's/\.//'):latest"
IMAGE_ALPINE="docker.io/alpine:3.8"
IMAGE_ALPINE="docker.io/alpine:3.22"
IMAGE_DOCS="ghcr.io/typo3-documentation/render-guides:latest"
IMAGE_MARIADB="docker.io/mariadb:${DBMS_VERSION}"
IMAGE_MYSQL="docker.io/mysql:${DBMS_VERSION}"
Expand Down Expand Up @@ -516,17 +507,9 @@ case ${TEST_SUITE} in
cleanComposer
stashComposerFiles
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-install-highest-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/bash -c "
if [ ${TYPO3_VERSION} -eq 11 ]; then
if [ ${TYPO3_VERSION} -eq 14 ]; then
composer require --no-ansi --no-interaction --no-progress --no-install \
typo3/cms-core:^11.5.24 || exit 1
fi
if [ ${TYPO3_VERSION} -eq 12 ]; then
composer require --no-ansi --no-interaction --no-progress --no-install \
typo3/cms-core:^12.4.2 || exit 1
fi
if [ ${TYPO3_VERSION} -eq 13 ]; then
composer require --no-ansi --no-interaction --no-progress --no-install \
typo3/cms-core:^13.4 || exit 1
typo3/cms-core:^14.0 || exit 1
fi
composer update --no-progress --no-interaction || exit 1
composer show || exit 1
Expand All @@ -538,17 +521,9 @@ case ${TEST_SUITE} in
cleanComposer
stashComposerFiles
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name composer-install-lowest-${SUFFIX} -e COMPOSER_CACHE_DIR=.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/bash -c "
if [ ${TYPO3_VERSION} -eq 11 ]; then
composer require --no-ansi --no-interaction --no-progress --no-install \
typo3/cms-core:^11.5.24 || exit 1
fi
if [ ${TYPO3_VERSION} -eq 12 ]; then
composer require --no-ansi --no-interaction --no-progress --no-install \
typo3/cms-core:^12.4.2 || exit 1
fi
if [ ${TYPO3_VERSION} -eq 13 ]; then
if [ ${TYPO3_VERSION} -eq 14 ]; then
composer require --no-ansi --no-interaction --no-progress --no-install \
typo3/cms-core:^13.4 || exit 1
typo3/cms-core:^14.0 || exit 1
fi
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest || exit 1
composer show || exit 1
Expand Down Expand Up @@ -588,7 +563,11 @@ case ${TEST_SUITE} in
SUITE_EXIT_CODE=$?
;;
postgres)
${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-func-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs /var/lib/postgresql/data:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null
POSTGRES_TMPFS="/var/lib/postgresql/data"
if [[ ${DBMS_VERSION} -eq 18 ]]; then
POSTGRES_TMPFS="/var/lib/postgresql"
fi
${CONTAINER_BIN} run --rm ${CI_PARAMS} --name postgres-func-${SUFFIX} --network ${NETWORK} -d -e POSTGRES_PASSWORD=funcp -e POSTGRES_USER=funcu --tmpfs ${POSTGRES_TMPFS}:rw,noexec,nosuid ${IMAGE_POSTGRES} >/dev/null
waitFor postgres-func-${SUFFIX} 5432
CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_pgsql -e typo3DatabaseName=bamboo -e typo3DatabaseUsername=funcu -e typo3DatabaseHost=postgres-func-${SUFFIX} -e typo3DatabasePassword=funcp"
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}"
Expand Down
1 change: 1 addition & 0 deletions Build/phpunit/FunctionalTestsBootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of the TYPO3 CMS project.
*
Expand Down
1 change: 1 addition & 0 deletions Build/phpunit/UnitTestsBootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of the TYPO3 CMS project.
*
Expand Down
Loading
Loading