aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-10 14:54:13 +0200
committerMario Vavti <mario@mariovavti.com>2018-10-10 14:54:13 +0200
commit09a46d0c740b87d28cdea03daca4e453ff82add3 (patch)
tree23aa504b746eb72a8a5a12bd7a5e55deac4f9282
parent97fcc495f2d6638eb2fce1aad93ea3e775b2738e (diff)
downloadvolse-hubzilla-09a46d0c740b87d28cdea03daca4e453ff82add3.tar.gz
volse-hubzilla-09a46d0c740b87d28cdea03daca4e453ff82add3.tar.bz2
volse-hubzilla-09a46d0c740b87d28cdea03daca4e453ff82add3.zip
gitlab-ci example file
-rw-r--r--.gitlab-ci.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..ed0ace991
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,42 @@
+# Select image from https://hub.docker.com/_/php/
+image: php:5.6
+
+# Select what we should cache
+cache:
+ paths:
+ - vendor/
+
+before_script:
+# Install git, the php image doesn't have installed
+- apt-get update -yqq
+- apt-get install git -yqq
+
+# Install mysql driver
+- docker-php-ext-install pdo_mysql
+
+# Install composer
+- curl -sS https://getcomposer.org/installer | php
+
+# Install all project dependencies
+- php composer.phar install
+
+services:
+- mysql
+
+variables:
+ # Configure mysql service (https://hub.docker.com/_/mysql/)
+ MYSQL_DATABASE: hello_world_test
+ MYSQL_ROOT_PASSWORD: mysql
+
+# We test PHP5.6 (the default) with MySQL
+test:mysql:
+ script:
+ - vendor/bin/phpunit --configuration phpunit_mysql.xml --coverage-text
+
+# We test PHP7 with MySQL, but we allow it to fail
+test:php7:mysql:
+ image: php:7
+ script:
+ - vendor/bin/phpunit --configuration phpunit_mysql.xml --coverage-text
+ allow_failure: true
+