Skip to content

Instantly share code, notes, and snippets.

@badri
Created February 16, 2018 15:36
Show Gist options
  • Save badri/c5dc0d09b7464d394327ab88426fd12d to your computer and use it in GitHub Desktop.
Save badri/c5dc0d09b7464d394327ab88426fd12d to your computer and use it in GitHub Desktop.
Gitlab CI behat
image: tetraweb/php:7.1
services:
- mariadb:latest
variables:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
cache:
paths:
- vendor/
stages:
- test
- deploy
behat-staple:
stage: test
only:
- develop
script:
- docker-php-ext-enable gd mbstring pdo pdo_mysql pdo_pgsql zip
- apt-get update && apt-get --assume-yes install mysql-client
- composer install
- /usr/bin/env PHP_OPTIONS="-d sendmail_path=/bin/true" vendor/bin/drush si --root=./web standard --db-url=mysql://drupal:drupal@mariadb:3306/drupal -y
- php -S 0.0.0.0:8080 -t ./web &> /dev/null &
- curl http://localhost:8080
$ php -S 0.0.0.0:8080 -t ./web &> /dev/null &
$ curl http://localhost:8080
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 8080: Connection refused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment