diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79c605f..e210c6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,13 +23,20 @@ setup:composer: test:acceptance: image: php:7.2-alpine stage: test + services: + - mysql:5.7 + variables: + MYSQL_DATABASE: workshopgitlabtesting + MYSQL_ROOT_PASSWORD: testing dependencies: - setup:composer before_script: - - apk --no-cache add sqlite - - cp public/index.php app + - docker-php-ext-install pdo pdo_mysql + - cp public/index.php app/index.php - cp public/typo3/index.php app/typo3/index.php - cp public/typo3/install.php app/typo3/install.php - - TYPO3_PATH_ROOT=$(pwd)/app/typo3temp/var/tests/acceptance TYPO3_PATH_APP=$(pwd)/app/typo3temp/var/tests/acceptance php -S 127.0.0.1:8080 -t app/typo3temp/var/tests/acceptance & + - sed -i.bak -e '133,136d' vendor/typo3/testing-framework/Classes/Core/Testbase.php + - mkdir -p app/typo3temp/var/tests/acceptance + - env TYPO3_PATH_ROOT="$CI_PROJECT_DIR/app/typo3temp/var/tests/acceptance" TYPO3_PATH_APP="$CI_PROJECT_DIR/app/typo3temp/var/tests/acceptance" php -S 127.0.0.1:8080 -t app/typo3temp/var/tests/acceptance & script: - ./vendor/bin/codecept run diff --git a/tests/Classes/Acceptance/Typo3Environment.php b/tests/Classes/Acceptance/Typo3Environment.php index 5d2feff..49ed013 100644 --- a/tests/Classes/Acceptance/Typo3Environment.php +++ b/tests/Classes/Acceptance/Typo3Environment.php @@ -33,13 +33,13 @@ class Typo3Environment extends BackendEnvironment public function _initialize() { ArrayUtility::mergeRecursiveWithOverrule($this->config, [ - 'typo3DatabaseDriver' => 'pdo_sqlite', - // 'typo3DatabaseDriver' => 'pdo_mysql', - // 'typo3DatabaseHost' => 'localhost', - // 'typo3DatabaseUsername' => 'testing', - // 'typo3DatabasePassword' => 'testing', - // 'typo3DatabaseName' => 'workshopgitlabtesting', - // 'typo3DatabasePort' => '3306', + // 'typo3DatabaseDriver' => 'pdo_sqlite', + // 'typo3DatabaseName' => 'workshopgitlabtesting.sqlite', + 'typo3DatabaseDriver' => 'pdo_mysql', + 'typo3DatabaseHost' => 'mysql', + 'typo3DatabaseUsername' => 'root', + 'typo3DatabasePassword' => 'testing', + 'typo3DatabaseName' => 'workshopgitlabtesting', 'coreExtensionsToLoad' => [ 'core', 'extbase',