1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-23 05:49:47 +01:00

Initial GitLab CI integration

This commit is contained in:
Deltik 2019-03-29 09:49:34 -05:00
parent 024287d821
commit eee057c3dd
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637
3 changed files with 65 additions and 0 deletions

35
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,35 @@
before_script:
- bash ./lib/ci/setup.sh
cache:
paths:
- ./vendor/
variables:
MYSQL_DATABASE: app
MYSQL_ROOT_PASSWORD: 'Database Password for Continuous Integration'
test:php5.6-mysql5.5:
services:
- mysql:5.5
image: php:5.6
script: "php ./vendor/bin/codecept run unit --steps --debug"
test:php7.1-mysql5.6:
services:
- mysql:5.6
image: php:7.1
script: "php ./vendor/bin/codecept run unit --steps --debug --coverage --coverage-xml --coverage-html"
test:php7.2-mysql5.7:
services:
- mysql:5.6
image: php:7.2
script: "php ./vendor/bin/codecept run unit --steps --debug --coverage --coverage-xml --coverage-html"
test:php7.3-mysql8.0:
services:
- name: mysql:8.0
command: ["mysqld", "--default-authentication-plugin=mysql_native_password"]
image: php:7.3
script: "php ./vendor/bin/codecept run unit --steps --debug --coverage --coverage-xml --coverage-html"

10
lib/ci/config.ci.yml Normal file
View File

@ -0,0 +1,10 @@
---
deployer: 'local'
url: 'http://set-this-to-your-acceptance-test-url.local/'
db:
host: 'mysql'
dbname: 'app'
user: 'root'
password: 'Database Password for Continuous Integration'
populate: true
dump_path: 'tests/_data/e107_v2.1.9.sample.sql'

20
lib/ci/setup.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
apt-get update
apt-get install -y git zip libzip-dev
pecl install zip
docker-php-ext-enable zip
pecl install xdebug
docker-php-ext-enable xdebug
docker-php-ext-install pdo_mysql
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
php composer.phar install
git submodule update --init --recursive --remote
cp ./lib/ci/config.ci.yml ./config.yml