Added gitlab runner configuration
This commit is contained in:
parent
44769e3de7
commit
83aa81f0c3
43
.gitlab-ci.yml
Normal file
43
.gitlab-ci.yml
Normal file
@ -0,0 +1,43 @@
|
||||
services:
|
||||
- centos/mariadb:latest
|
||||
|
||||
variables:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_DATABASE: homestead
|
||||
|
||||
before_script:
|
||||
# Install dependencies
|
||||
- bash ci/docker_install.sh > /dev/null
|
||||
- echo "Load sample DB"
|
||||
|
||||
# We test PHP5.6
|
||||
test:5.5:
|
||||
image: php:5.5
|
||||
script:
|
||||
- phpunit --bootstrap=includes/kohana/modules/unittest/bootstrap.php --exclude-group kohana --colors --verbose $@ includes/kohana/modules/unittest/tests.php --site=test
|
||||
only:
|
||||
- test
|
||||
tags:
|
||||
- php
|
||||
|
||||
# We test PHP7.0 (good luck with that)
|
||||
test:5.6:
|
||||
image: php:5.6
|
||||
script:
|
||||
- phpunit --bootstrap=includes/kohana/modules/unittest/bootstrap.php --exclude-group kohana --colors --verbose $@ includes/kohana/modules/unittest/tests.php --site=test
|
||||
only:
|
||||
- test
|
||||
tags:
|
||||
- php
|
||||
|
||||
# We test PHP7.0 (good luck with that)
|
||||
test:7.0:
|
||||
image: php:7.0
|
||||
script:
|
||||
- phpunit --bootstrap=includes/kohana/modules/unittest/bootstrap.php --exclude-group kohana --colors --verbose $@ includes/kohana/modules/unittest/tests.php --site=test
|
||||
only:
|
||||
- test
|
||||
tags:
|
||||
- php
|
18
ci/docker_install.sh
Normal file
18
ci/docker_install.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# We need to install dependencies only for Docker
|
||||
[[ ! -e /.dockerenv ]] && [[ ! -e /.dockerinit ]] && exit 0
|
||||
|
||||
set -xe
|
||||
|
||||
# Install git (the php image doesn't have it) which is required by composer
|
||||
apt-get update -yqq
|
||||
apt-get install git -yqq
|
||||
|
||||
# Install phpunit, the tool that we will use for testing
|
||||
curl -o /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
|
||||
chmod +x /usr/local/bin/phpunit
|
||||
|
||||
# Install mysql driver
|
||||
# Here you can install any other extension that you need
|
||||
docker-php-ext-install pdo_mysql
|
Reference in New Issue
Block a user