.gitlab-ci.yml 1.55 KB
Newer Older
Alexandre Morin's avatar
Alexandre Morin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
Alexandre Morin's avatar
Alexandre Morin committed
19
  - bash ci/docker_install_database.sh > /dev/null
Alexandre Morin's avatar
Alexandre Morin committed
20
21
22
23
24

job_php-7.3:
  image: php:7.3-apache
  stage: test
  script:
25
26
    - useradd -m -g www-data maarch
    - export APACHE_RUN_USER=maarch
Alexandre Morin's avatar
Alexandre Morin committed
27
    - mkdir -p /var/www/html/
Alexandre Morin's avatar
Alexandre Morin committed
28
    - cp -R /builds/maarch/maarchRM/ /var/www/maarchRM/
Alexandre Morin's avatar
Alexandre Morin committed
29
30
    - mv /var/www/maarchRM/ /var/www/laabs/
    - cd /var/www/laabs
Alexandre Morin's avatar
Alexandre Morin committed
31
32
33
    - cp data/maarchRM/conf/vhost.conf.default data/maarchRM/conf/vhost.conf
    - cp data/maarchRM/conf/configuration.ini.default data/maarchRM/conf/configuration.ini
    - cp data/maarchRM/conf/confvars.ini.default data/maarchRM/conf/confvars.ini
34
35
36
    - mkdir -p /var/www/laabs/data/maarchRM/repository/archives_1 /var/www/laabs/data/maarchRM/repository/archives_2
    - chown -R maarch:www-data /var/www
    - chmod -R 775 /var/www
Alexandre Morin's avatar
Alexandre Morin committed
37
    - cd /etc/apache2/sites-available/
38
39
40
41
    - touch maarchRM.conf
    - echo "Include /var/www/laabs/data/maarchRM/conf/vhost.conf" >> maarchRM.conf
    - a2ensite maarchRM.conf
    - a2dissite 000-default.conf
Alexandre Morin's avatar
Alexandre Morin committed
42
43
    - curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-7.phar
    - chmod +x /usr/local/bin/phpunit
44
    # - phpunit --coverage-text --colors=never -c phpunit.xml
Alexandre Morin's avatar
Alexandre Morin committed
45
  only:
Alexandre Morin's avatar
Alexandre Morin committed
46
    - feat/gitlab_ci