workshop-gitlab-acceptance/.gitlab-ci.yml

43 lines
1.4 KiB
YAML
Raw Normal View History

2018-11-03 19:33:21 +01:00
stages:
- setup
2018-11-04 00:39:37 +01:00
- test
2018-11-03 19:33:21 +01:00
setup:composer:
image: composer:latest
stage: setup
script:
- mkdir -p .composer/cache
- composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN
- COMPOSER_CACHE_DIR=.composer/cache composer install --no-progress --no-ansi --no-interaction -o
cache:
key: composer-cache
paths:
- .composer/cache
artifacts:
2018-11-04 00:45:42 +01:00
expire_in: 1 hour
paths:
- app
- public
- vendor
2018-11-04 00:39:37 +01:00
test:acceptance:
image: php:7.2-alpine
stage: test
2018-11-04 00:53:22 +01:00
services:
- mysql:5.7
variables:
MYSQL_DATABASE: workshopgitlabtesting
MYSQL_ROOT_PASSWORD: testing
2018-11-04 00:39:37 +01:00
dependencies:
- setup:composer
before_script:
2018-11-04 00:53:22 +01:00
- docker-php-ext-install pdo pdo_mysql
- cp public/index.php app/index.php
2018-11-04 00:39:37 +01:00
- cp public/typo3/index.php app/typo3/index.php
- cp public/typo3/install.php app/typo3/install.php
2018-11-04 00:53:22 +01:00
- 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 &
2018-11-04 00:39:37 +01:00
script:
- ./vendor/bin/codecept run