From a7e49006908e07f1de45269f43bbfeb4c37c388e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 20 Apr 2021 15:32:41 +0000 Subject: [PATCH] Add .gitlab-ci.yml --- .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..b500e52db --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,46 @@ +# This file is a template, and might need editing before it works on your project. +# Select image from https://hub.docker.com/_/php/ +image: php:7.4 + +# Select what we should cache between builds +cache: + paths: + - vendor/ + +before_script: + - apt-get update -yqq + - apt-get install -yqq git libicu-dev g++ postgresql-server-dev-10 libzip-dev libzip4 unzip libfreetype6-dev libonig-dev `# install oniguruma, required for mbstring` libpng-dev libjpeg62-turbo-dev + # Install PHP extensions + - docker-php-ext-configure gd --with-freetype --with-jpeg + - docker-php-ext-install intl pdo_pgsql mbstring zip bcmath sockets exif + - mkdir /tmp/redis \ + && curl -L -o /tmp/redis/redis.tar.gz https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz \ + && cd /tmp/redis \ + && tar xfz /tmp/redis/redis.tar.gz \ + && rm -r /tmp/redis/redis.tar.gz \ + && mkdir -p /usr/src/php/ext/redis \ + && mv /tmp/redis/phpredis-$PHPREDIS_VERSION/* /usr/src/php/ext/redis/. \ + && docker-php-ext-install redis + # 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/ee/ci/services/README.html for examples. +services: + - postgresql:12 + +# Set any variables we need +variables: + # Configure postgres environment variables (https://hub.docker.com/r/_/postgres/) + POSTGRES_USER=postgres + POSTGRES_PASSWORD=postgres + +# Run our tests +# If Xdebug was installed you can generate a coverage report and see code coverage metrics. +test: + script: + - bin/phpunit --colors=never