forked from TYPO3/typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Add composer-mode to our acceptance test matrix
All applicable acceptance tests are now also executed in composer mode. Tests that check classic-mode specific functions are excluded and are therefore now tagged as classic-mode test. The composer mode instance is generated with our CLI setup tools, allowing to mimic the realworld case where a instance is creating via our setup tools instead of from fixtures (which we still use for classic mode tests, but try to reducde/avoid for composer mode tests). The existing existing classic-mode test acceptance test execution will keep running as-is. Resolves: #103297 Releases: main, 12.4, 11.5 Change-Id: I64973f110931b51ed2ef7ef8f8cc3411834fcf37 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83027 Tested-by: Stefan Bürk <[email protected]> Reviewed-by: Christian Kuhn <[email protected]> Tested-by: Christian Kuhn <[email protected]> Reviewed-by: Stefan Bürk <[email protected]> Tested-by: core-ci <[email protected]> Reviewed-by: Benjamin Franzke <[email protected]> Tested-by: Benjamin Franzke <[email protected]>
- Loading branch information
Showing
29 changed files
with
617 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cd "$(dirname $(realpath $0))/../../" | ||
|
||
PROJECT_PATH=${1:-typo3temp/var/tests/acceptance-composer/} | ||
export TYPO3_DB_DRIVER=${2:-${TYPO3_DB_DRIVER:-sqlite}} | ||
EXTRA_PACKAGES="${3}" | ||
|
||
mkdir -p "${PROJECT_PATH}" | ||
ln -snf $(echo "${PROJECT_PATH}" | sed -e 's/[^\/][^\/]*/../g' -e 's/\/$//')/typo3/sysext "${PROJECT_PATH}/typo3-sysext" | ||
ln -snf $(echo "${PROJECT_PATH}" | sed -e 's/[^\/][^\/]*/../g' -e 's/\/$//')/Build/tests/packages "${PROJECT_PATH}/packages" | ||
sed 's/..\/..\/typo3\/sysext/typo3-sysext/' Build/composer/composer.dist.json > "${PROJECT_PATH}/composer.json" | ||
|
||
cd "${PROJECT_PATH}" | ||
rm -rf composer.lock config/ public/ var/ vendor/ | ||
|
||
mkdir -p "config/system/" | ||
cat > "config/system/additional.php" <<\EOF | ||
<?php | ||
$GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] = true; | ||
// "temporary password" | ||
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$argon2i$v=19$m=65536,t=16,p=1$Rk9Edk1UWTd1MUtVY1Nydg$bJJgiAH3NT66LkvcTsnYbQvFS/ePOw/50rYjhxUk8L8'; | ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['displayErrors'] = true; | ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'] = '*'; | ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] = E_ALL; | ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] = E_ALL; | ||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*'; | ||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor'] = 'GraphicsMagick'; | ||
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = 'mbox'; | ||
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_mbox_file'] = \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/mail.mbox'; | ||
EOF | ||
|
||
# `composer require` will implicitly perform an initial `composer install` since there is no composer.lock | ||
composer require --no-progress --no-interaction --dev typo3tests/dataset-import:@dev typo3/testing-framework:dev-main ${EXTRA_PACKAGES} | ||
|
||
TYPO3_SERVER_TYPE=apache \ | ||
TYPO3_PROJECT_NAME="New TYPO3 site" \ | ||
vendor/bin/typo3 setup --force --no-interaction | ||
|
||
vendor/bin/typo3 dataset:import vendor/typo3/cms-core/Tests/Acceptance/Fixtures/BackendEnvironment.csv | ||
vendor/bin/typo3 styleguide:generate -c -- all | ||
|
||
# Create favicon.ico to suppress potential javascript errors in console | ||
# which are caused by calling a non html in the browser, e.g. seo sitemap xml | ||
ln -snf ../vendor/typo3/cms-backend/Resources/Public/Icons/favicon.ico public/favicon.ico | ||
|
||
# @todo: needed for ugly InstallTool tests, that should be replace by a CLI command that properly enables install tool, both in composer and classic mode | ||
mkdir -p var/transient/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
Build/gitlab-ci/nightly/acceptance-application-composer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
acceptance application composer mariadb 10.4 php 8.2 min: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-min | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d mariadb -i 10.4 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
acceptance application composer mariadb 10.10 php 8.3 max: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-max | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMax -p 8.3 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d mariadb -i 10.10 -p 8.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
|
||
acceptance application composer mysql 8.0 php 8.3 max: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-max | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMax -p 8.3 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d mysql -i 8.0 -p 8.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
acceptance application composer mysql 8.0 php 8.2 min: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-min | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d mysql -i 8.0 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
|
||
acceptance application composer sqlite php 8.3 max: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-max | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMax -p 8.3 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d sqlite -p 8.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
acceptance application composer sqlite php 8.2 min: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-min | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d sqlite -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
|
||
acceptance application composer postgres 15 php 8.3 max: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-max | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMax -p 8.3 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d postgres -i 15 -p 8.3 -c $CI_NODE_INDEX/$CI_NODE_TOTAL | ||
acceptance application composer postgres 10 php 8.2 min: | ||
stage: acceptance | ||
tags: | ||
- metal2 | ||
needs: [] | ||
only: | ||
- schedules | ||
cache: | ||
key: main-composer-min | ||
paths: | ||
- .cache | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 8 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstallMin -p 8.2 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -d postgres -i 10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL |
17 changes: 17 additions & 0 deletions
17
Build/gitlab-ci/pre-merge/acceptance-application-composer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
acceptance application composer postgres 15 php 8.2 pre-merge: | ||
stage: main | ||
tags: | ||
- metal2 | ||
except: | ||
refs: | ||
- schedules | ||
- main | ||
artifacts: | ||
when: on_failure | ||
paths: | ||
- typo3temp/var/tests/acceptance-composer/var/log | ||
- typo3temp/var/tests/AcceptanceReports | ||
parallel: 13 | ||
script: | ||
- Build/Scripts/runTests.sh -s composerInstall -p 8.2 | ||
- Build/Scripts/runTests.sh -s acceptanceComposer -p 8.2 -d postgres -i 15 -c $CI_NODE_INDEX/$CI_NODE_TOTAL |
Oops, something went wrong.