From ac59a7ffd2d4cd60e6d067a8cd9ee2ed7c7b8987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Uzna=C5=84ski?= Date: Tue, 22 Sep 2020 23:16:08 +0200 Subject: [PATCH] [TASK] Add test stage to gitlab CI (#103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Łukasz Uznański --- .gitlab/build/docker_install.sh | 4 +- .gitlab/pipeline/.gitlab-ci.yml | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 2 deletions(-) diff --git a/.gitlab/build/docker_install.sh b/.gitlab/build/docker_install.sh index 885f4c9..ef0bccf 100644 --- a/.gitlab/build/docker_install.sh +++ b/.gitlab/build/docker_install.sh @@ -5,9 +5,9 @@ set -xe apt-get update -yqq -apt-get install git libzip-dev unzip libxml2-utils wget -yqq +apt-get install git libzip-dev unzip parallel libxml2-utils wget -yqq php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/local/bin/ --filename=composer chmod +x /usr/local/bin/composer -docker-php-ext-install zip +docker-php-ext-install pdo_mysql zip mysqli diff --git a/.gitlab/pipeline/.gitlab-ci.yml b/.gitlab/pipeline/.gitlab-ci.yml index 2422110..a47d4de 100644 --- a/.gitlab/pipeline/.gitlab-ci.yml +++ b/.gitlab/pipeline/.gitlab-ci.yml @@ -15,6 +15,13 @@ default: before_script: - bash .gitlab/build/docker_install.sh > /dev/null +variables: + MYSQL_ROOT_PASSWORD: root + typo3DatabaseName: typo3 + typo3DatabaseHost: mariadb + typo3DatabaseUsername: root + typo3DatabasePassword: root + build-composer-dependencies: stage: build needs: [] @@ -84,6 +91,138 @@ xliff-lint: - xmllint --schema ./xliff-core-1.2-strict.xsd --noout $(find Resources -name '*.xlf') +unit-php7.2-v10: + image: php:7.2 + stage: test + needs: + - build-composer-dependencies + - php-lint-php7.2 + script: + - composer ci:tests:unit + +unit-php7.3-v10: + image: php:7.3 + stage: test + needs: + - build-composer-dependencies + - php-lint-php7.3 + script: + - composer ci:tests:unit + +unit-php7.4-v10: + image: php:7.4 + stage: test + needs: + - build-composer-dependencies + - php-lint-php7.4 + script: + - composer ci:tests:unit + +func-php7.2-v10: + image: php:7.2 + services: + - mariadb:10 + stage: test + needs: + - build-composer-dependencies + - php-lint-php7.2 + script: + - composer ci:tests:functional + +func-php7.3-v10: + image: php:7.3 + services: + - mariadb:10 + stage: test + needs: + - build-composer-dependencies + - php-lint-php7.3 + script: + - composer ci:tests:functional + +func-php7.4-v10: + image: php:7.4 + services: + - mariadb:10 + stage: test + needs: + - build-composer-dependencies + - php-lint-php7.4 + script: + - composer ci:tests:functional + +unit-php7.2-v9: + image: php:7.2 + stage: test + dependencies: [] + needs: + - build-composer-dependencies + - php-lint-php7.2 + script: + - composer require typo3/minimal:"^9.5" + - composer ci:tests:unit + +unit-php7.3-v9: + image: php:7.3 + stage: test + dependencies: [] + needs: + - build-composer-dependencies + - php-lint-php7.3 + script: + - composer require typo3/minimal:"^9.5" + - composer ci:tests:unit + +unit-php7.4-v9: + image: php:7.4 + stage: test + dependencies: [] + needs: + - build-composer-dependencies + - php-lint-php7.4 + script: + - composer require typo3/minimal:"^9.5" + - composer ci:tests:unit + +func-php7.2-v9: + image: php:7.2 + services: + - mariadb:10 + stage: test + dependencies: [] + needs: + - build-composer-dependencies + - php-lint-php7.2 + script: + - composer require typo3/minimal:"^9.5" + - composer ci:tests:functional + +func-php7.3-v9: + image: php:7.3 + services: + - mariadb:10 + stage: test + dependencies: [] + needs: + - build-composer-dependencies + - php-lint-php7.3 + script: + - composer require typo3/minimal:"^9.5" + - composer ci:tests:functional + +func-php7.4-v9: + image: php:7.4 + services: + - mariadb:10 + stage: test + dependencies: [] + needs: + - build-composer-dependencies + - php-lint-php7.4 + script: + - composer require typo3/minimal:"^9.5" + - composer ci:tests:functional + phpcs: stage: codestyle needs: