Commit 9334f777 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] runTests.sh: composer test distribution

We're delivering a "test distribution" composer.json
in Build/composer since #94996.

The patch adds "runTests.sh -s composerTestDistribution"
that "composer update" this project and adds it to
pre-merge and nightly integrity suite.

This verifies core dependencies are fine at all times.
Main difference to the monorepo: This composer setup
has no dev dependencies that influence version decisions.

Resolves: #95188
Related: #94996
Releases: master
Change-Id: I04084a2a44a69903d523b5c4740d62d7dc46c1f1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71030


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 11d458d4
......@@ -109,6 +109,7 @@ Options:
- composerInstall: "composer install"
- composerInstallMax: "composer update", with no platform.php config.
- composerInstallMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0.
- composerTestDistribution: "composer update" in Build/composer to verify core dependencies
- composerValidate: "composer validate"
- fixCsvFixtures: fix broken functional test csv fixtures
- functional: functional tests
......@@ -611,6 +612,12 @@ case ${TEST_SUITE} in
SUITE_EXIT_CODE=$?
docker-compose down
;;
composerTestDistribution)
setUpDockerComposeDotEnv
docker-compose run composer_test_distribution
SUITE_EXIT_CODE=$?
docker-compose down
;;
composerValidate)
setUpDockerComposeDotEnv
docker-compose run composer_validate
......
{
"name": "typo3/test-distribution",
"type": "typo3-cms-distribution",
"version": "4.13.4",
"description": "For testing Composer installation",
"repositories": [
{
......
......@@ -36,7 +36,13 @@ integration various php 7.4:
stage: integrity
only:
- schedules
cache:
key: master-composer-phpmixed
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerTestDistribution -p 7.4
- Build/Scripts/runTests.sh -s composerTestDistribution -p 8.0
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s checkExceptionCodes -p 7.4
- Build/Scripts/runTests.sh -s checkGitSubmodule -p 7.4
......
......@@ -27,7 +27,13 @@ integration various php 7.4 pre-merge:
refs:
- schedules
- master
cache:
key: master-composer-phpmixed
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerTestDistribution -p 7.4
- Build/Scripts/runTests.sh -s composerTestDistribution -p 8.0
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s checkExceptionCodes -p 7.4
- Build/Scripts/runTests.sh -s checkGitSubmodule -p 7.4
......
......@@ -731,12 +731,14 @@ services:
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
environment:
COMPOSER_CACHE_DIR: ".cache/composer"
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
COMPOSER_CACHE_DIR=".cache/composer" composer install --no-progress --no-interaction;
composer install --no-progress --no-interaction;
"
composer_install_max:
......@@ -748,13 +750,15 @@ services:
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
environment:
COMPOSER_CACHE_DIR: ".cache/composer"
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
composer config --unset platform.php;
COMPOSER_CACHE_DIR=".cache/composer" composer update --no-progress --no-interaction;
composer update --no-progress --no-interaction;
composer dumpautoload;
"
......@@ -767,16 +771,41 @@ services:
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
environment:
COMPOSER_CACHE_DIR: ".cache/composer"
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
composer config platform.php ${PHP_VERSION}.0;
COMPOSER_CACHE_DIR=".cache/composer" composer update --prefer-lowest --no-progress --no-interaction;
composer update --prefer-lowest --no-progress --no-interaction;
composer dumpautoload;
"
composer_test_distribution:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
environment:
COMPOSER_ROOT_VERSION: dev-master
COMPOSER_CACHE_DIR: .cache/composer
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
cd Build/composer
rm -rf composer.json composer.lock public/index.php public/typo3 public/typo3conf/ext var/ vendor/;
cp composer.dist.json composer.json;
composer update --no-progress --no-interaction;
"
composer_validate:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: "${HOST_UID}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment