mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 00:19:05 +00:00
[CI] Simplify & optimize CI configuration
This commit is contained in:
parent
d3c3ab70f1
commit
f1f8cd857e
@ -1,38 +1,21 @@
|
||||
image: php:latest
|
||||
|
||||
# Select what we should cache between builds
|
||||
services:
|
||||
- mariadb:latest
|
||||
|
||||
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
|
||||
- apt update -yqq
|
||||
- apt install -yqq git libmcrypt-dev libcurl4-gnutls-dev libexpat1-dev libxml2-dev libpcre3-dev unzip libzip-dev zlib1g-dev libbz2-dev
|
||||
- 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
|
||||
@ -40,8 +23,6 @@ variables:
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user