workshop-gitlab-acceptance/.gitlab-ci.yml
Daniel Siepmann 177c654106
Add PHP output to artifact
Do not clutter stdout in web ui. Instead move PHP output to a file and
add this one to artifacts.
2019-09-10 11:39:16 +02:00

48 lines
1.2 KiB
YAML

stages:
- setup
- test
setup:composer:
image: composer:latest
stage: setup
script:
- mkdir -p .composer/cache
- COMPOSER_CACHE_DIR=.composer/cache composer install --no-progress --no-ansi --no-interaction -o
cache:
key: composer-cache
paths:
- .composer/cache
artifacts:
expire_in: 30 mins
paths:
- app
- web
- vendor
test:acceptance:
image: php:7.2-alpine
stage: test
services:
- mysql:5.7
- mailhog/mailhog:v1.0.0
- selenium/standalone-chrome
variables:
MYSQL_ROOT_PASSWORD: "dev"
MYSQL_DATABASE: "dev"
MYSQL_USER: "dev"
MYSQL_PASSWORD: "dev"
before_script:
- docker-php-ext-install pdo pdo_mysql mysqli
- export LOCAL_IP=$(ip a | grep inet | sed -n 2p | xargs | cut -d" " -f2 | cut -d"/" -f1)
- export TESTING_DOMAIN="$LOCAL_IP:8080"
- export TYPO3_CONTEXT=Testing/Acceptance
- php -S "$TESTING_DOMAIN" -t web &> php.log.txt &
script:
- ./vendor/bin/codecept run --env=gitlab-ci
artifacts:
when: on_failure
expire_in: 10 mins
paths:
- tests/_output/
- php.log.txt