Verified Commit e19650cc authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Init gitlab ci

parent cccb4c9e
services:
- postgres:9.4
variables:
POSTGRES_DB: "maarchRM"
POSTGRES_USER: maarch
POSTGRES_PASSWORD: ""
stages:
- test
before_script:
- apt-get update > /dev/null
- mkdir -p /usr/share/man/man1
- mkdir -p /usr/share/man/man7
- apt-get install cron -yqq > /dev/null
- apt-get install libreoffice -yqq > /dev/null
- bash ci/docker_install_php.sh > /dev/null
- bash ci/docker_install_database.sh > /dev/null
job_php-7.3:
image: php:7.3-apache
stage: test
script:
- mkdir -p /var/www/html/
- cp -R /builds/maarch/maarchRM/ /var/www/laabs/
- mv /var/www/maarchRM/ /var/www/laabs/
- cd /var/www/laabs
- curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-7.phar
- chmod +x /usr/local/bin/phpunit
- phpunit --coverage-text --colors=never -c phpunit.xml
only:
- release/2.4
#!/usr/bin/env bash
# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && exit 0
set -xe
apt-get update -yqq
apt-get install git p7zip-full default-jre -yqq
curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod +x /usr/local/bin/phpunit
apt-get install -y libpq-dev libxml2-dev libxslt1-dev libpng-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo_pgsql pgsql xsl gd \
&& pecl install xdebug-2.7.0RC2 \
&& docker-php-ext-enable xdebug
#!/bin/bash
[[ ! -e /.dockerenv ]] && exit 0
set -xe
apt-get install postgresql-client -yqq
psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -w < /builds/maarch/MaarchRM/data/maarchRM/batch/psql/structure.sql
psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -w < /builds/maarch/MaarchRM/data/maarchRM/batch/psql/data_fr.sql
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment