Commit a734dcb6 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] runTests.sh: Add install on mysql and grunt clean check

Allow:
* Build/Scripts/runTests.sh -s install -d mysql
* Build/Scripts/runTests.sh -s checkGruntClean

The acceptance tests of the install procedure were
missing an option for mysql as opposed to mariadb.

The grunt clean operation compiles everything (js, css, ..)
and verifies no files are changed afterwards. This is mostly
used in CI to ensure patches are pushed using 'current'
yarn/npm dependencies. Note this calls a 'git add', so it
might lead to unexpected git status results if executed
locally.

Change-Id: I21b235b2d264465166b5497e4b2bec25b45e7996
Resolves: #93369
Releases: master, 10.4, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67538

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d1242e69
......@@ -69,6 +69,7 @@ Options:
- checkExtensionScannerRst: test all .rst files referenced by extension scanner exist
- checkFilePathLength: test core file paths do not exceed maximum length
- checkGitSubmodule: test core git has no sub modules defined
- checkGruntClean: Verify "grunt build" is clean. Warning: Executes git commands! Usually used in CI only.
- checkPermissions: test some core files for correct executable bits
- checkRst: test .rst files for integrity
- checkXlf: test .xlf files for integrity
......@@ -446,6 +447,12 @@ case ${TEST_SUITE} in
SUITE_EXIT_CODE=$?
docker-compose down
;;
checkGruntClean)
setUpDockerComposeDotEnv
docker-compose run check_grunt_clean
SUITE_EXIT_CODE=$?
docker-compose down
;;
checkPermissions)
setUpDockerComposeDotEnv
docker-compose run check_permissions
......@@ -539,6 +546,11 @@ case ${TEST_SUITE} in
install)
setUpDockerComposeDotEnv
case ${DBMS} in
mysql)
docker-compose run prepare_acceptance_install_mysql
docker-compose run acceptance_install_mysql
SUITE_EXIT_CODE=$?
;;
mariadb)
docker-compose run prepare_acceptance_install_mariadb
docker-compose run acceptance_install_mariadb
......
......@@ -103,6 +103,46 @@ services:
$${COMMAND}
"
prepare_acceptance_install_mysql:
image: alpine:3.8
links:
- mysql
- chrome
- web
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
echo Waiting for database start...;
while ! nc -z mysql 3306; do
sleep 1;
done;
echo Database is up;
"
acceptance_install_mysql:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3InstallMysqlDatabaseHost: mysql
typo3InstallMysqlDatabaseName: func_test
typo3InstallMysqlDatabaseUsername: root
typo3InstallMysqlDatabasePassword: funcp
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
mkdir -p typo3temp/var/tests/ \
&& ./bin/codecept run Install -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql --xml reports.xml --html reports.html
"
prepare_acceptance_install_mariadb:
image: alpine:3.8
links:
......@@ -437,6 +477,28 @@ services:
fi
"
check_grunt_clean:
image: typo3gmbh/${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}/Build
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
YARN_CACHE_FOLDER="../.cache/yarn" yarn install || exit 1
node_modules/grunt/bin/grunt build;
cd ..;
git add *;
git status;
git status | grep -q \"nothing to commit, working tree clean\"
"
check_permissions:
image: typo3gmbh/${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