mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
48 lines
1.9 KiB
YAML
48 lines
1.9 KiB
YAML
image: php:latest
|
|
|
|
# Select what we should cache between builds
|
|
cache:
|
|
paths:
|
|
- vendor/
|
|
|
|
before_script:
|
|
- apt-get update -yqq
|
|
# libzip-dev is required but not included in default template
|
|
- apt-get install -yqq git libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev libzip-dev unzip
|
|
# Install PHP extensions
|
|
# mcrypt broken but included in default template:
|
|
# > $ docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache
|
|
# > error: /usr/src/php/ext/mcrypt does not exist
|
|
# mbstring broken because dependencies not included in default template:
|
|
# > $ docker-php-ext-install mbstring pdo_pgsql curl json intl gd xml zip bz2 opcache
|
|
# > No package 'oniguruma' found
|
|
- docker-php-ext-install pdo_mysql intl curl zip bz2
|
|
# Install & enable Xdebug for code coverage reports
|
|
- pecl install xdebug
|
|
- docker-php-ext-enable xdebug
|
|
# Install and run Composer
|
|
- curl -sS https://getcomposer.org/installer | php
|
|
- php composer.phar install
|
|
|
|
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
|
# See http://docs.gitlab.com/ce/ci/services/README.html for examples.
|
|
services:
|
|
- mariadb:latest
|
|
|
|
# Set any variables we need
|
|
variables:
|
|
COMPOSER: 'inc/test/composer.json'
|
|
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
|
|
MYSQL_HOST: mariadb
|
|
MYSQL_DATABASE: mysql_database
|
|
MYSQL_USERNAME: root
|
|
MYSQL_PASSWORD: mysql_strong_password
|
|
MYSQL_ROOT_PASSWORD: mysql_strong_password
|
|
LITEBANS_TABLE_PREFIX: test_
|
|
|
|
# Run our tests
|
|
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
|
|
test:
|
|
script:
|
|
- ./vendor/bin/phpunit inc/test/php
|