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

47 lines
1.2 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_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
2018-11-04 00:45:42 +01:00
paths:
- app
- web
2018-11-04 00:45:42 +01:00
- 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
- mailhog/mailhog:v1.0.0
- selenium/standalone-chrome
2018-11-04 00:53:22 +01:00
variables:
MYSQL_ROOT_PASSWORD: "dev"
MYSQL_DATABASE: "dev"
MYSQL_USER: "dev"
MYSQL_PASSWORD: "dev"
2018-11-04 00:39:37 +01:00
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 &
2018-11-04 00:39:37 +01:00
script:
- ./vendor/bin/codecept run --env=gitlab-ci
artifacts:
when: on_failure
expire_in: 10 mins
paths:
- tests/_output/