.gitlab-ci.yml 5.17 KB
Newer Older
Giovannoni Laurent's avatar
Giovannoni Laurent committed
1
services:
Florian Azizian's avatar
Florian Azizian committed
2
  - postgres:10.1
Giovannoni Laurent's avatar
Giovannoni Laurent committed
3 4 5 6 7 8 9 10 11 12 13

variables:
  POSTGRES_DB: "MaarchCourrier"
  POSTGRES_USER: maarch
  POSTGRES_PASSWORD: ""

stages:
  - test

before_script:
  - apt-get update > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
14 15
  - mkdir -p /usr/share/man/man1
  - mkdir -p /usr/share/man/man7
16
  #- apt-get install apt-utils -yqq > /dev/null
17 18
  - apt-get install cron -yqq > /dev/null
  #- apt-get install tar -yqq > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
19
  #- apt-get install wkhtmltopdf -yqq > /dev/null
20 21 22 23 24
  #- apt-get install wget -yqq > /dev/null
  #- wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  #- tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  #- mv wkhtmltox/bin/wkhtmlto* /usr/bin
  #- chmod +x /usr/bin/wkhtmlto*
25
  #- apt-get install libreoffice -yqq > /dev/null
Florian Azizian's avatar
Florian Azizian committed
26
  #- apt-get install poppler-utils -yqq > /dev/null
27
  #- apt-get install imagemagick -yqq > /dev/null
28
  #- apt-get install npm -yqq > /dev/null 
Giovannoni Laurent's avatar
Giovannoni Laurent committed
29 30 31 32
  - apt-get install git -yqq > /dev/null
  - bash ci/docker_install_php.sh > /dev/null
  - bash ci/docker_install_database.sh > /dev/null

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
job_php-7.4:
 image: php:7.4-apache
 stage: test
 script:
   - mkdir -p /opt/maarch/docservers/indexes/{letterbox_coll,attachments_coll,version_attachments_coll}
   - mkdir -p /opt/maarch/docservers/{ai,manual,manual_attachments,templates}
   - mkdir -p /opt/maarch/docservers/{convert_attachments,convert_attachments_version,convert_mlb}
   - mkdir -p /opt/maarch/docservers/{fulltext_attachments,fulltext_attachments_version,fulltext_mlb}
   - mkdir -p /opt/maarch/docservers/{thumbnails_attachments,thumbnails_attachments_version,thumbnails_mlb}
   - mkdir -p /var/www/html/
   - cp -R /builds/maarch/MaarchCourrier/ /var/www/html/
   - cd /var/www/html/MaarchCourrier
   - mkdir -p /var/www/html/MaarchCourrier
   - sed 's/<databaseserver>.*<\/databaseserver>/<databaseserver>postgres<\/databaseserver>/;s/<databasepassword>.*<\/databasepassword>/<databasepassword><\/databasepassword>/;s/<databasename>.*<\/databasename>/<databasename>MaarchCourrier<\/databasename>/;s/<databaseuser>.*<\/databaseuser>/<databaseuser>maarch<\/databaseuser>/' apps/maarch_entreprise/xml/config.xml.default > apps/maarch_entreprise/xml/config.xml
   - curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-8.phar
   - chmod +x /usr/local/bin/phpunit
49
   - phpunit --coverage-text --colors=never -c phpunit.xml
50 51
 only:
   - develop
52

53 54 55 56 57
job_php-7.3:
 image: php:7.3-apache
 stage: test
 script:
   - mkdir -p /opt/maarch/docservers/indexes/{letterbox_coll,attachments_coll,version_attachments_coll}
Florian Azizian's avatar
Florian Azizian committed
58 59 60 61 62 63 64 65
   - mkdir -p /opt/maarch/docservers/{ai,manual,manual_attachments,templates}
   - mkdir -p /opt/maarch/docservers/{convert_attachments,convert_attachments_version,convert_mlb}
   - mkdir -p /opt/maarch/docservers/{fulltext_attachments,fulltext_attachments_version,fulltext_mlb}
   - mkdir -p /opt/maarch/docservers/{thumbnails_attachments,thumbnails_attachments_version,thumbnails_mlb}
   - mkdir -p /var/www/html/
   - cp -R /builds/maarch/MaarchCourrier/ /var/www/html/
   - cd /var/www/html/MaarchCourrier
   - mkdir -p /var/www/html/MaarchCourrier
Florian Azizian's avatar
Florian Azizian committed
66
   - sed 's/<databaseserver>.*<\/databaseserver>/<databaseserver>postgres<\/databaseserver>/;s/<databasepassword>.*<\/databasepassword>/<databasepassword><\/databasepassword>/;s/<databasename>.*<\/databasename>/<databasename>MaarchCourrier<\/databasename>/;s/<databaseuser>.*<\/databaseuser>/<databaseuser>maarch<\/databaseuser>/' apps/maarch_entreprise/xml/config.xml.default > apps/maarch_entreprise/xml/config.xml
Florian Azizian's avatar
Florian Azizian committed
67
   - curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-8.phar
Florian Azizian's avatar
Florian Azizian committed
68
   - chmod +x /usr/local/bin/phpunit
69
   - phpunit --coverage-text --colors=never -c phpunit.xml
70 71
 only:
   - develop
72

73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
job_php-7.2:
  image: php:7.2-apache
  stage: test
  script:
    - mkdir -p /opt/maarch/docservers/indexes/{letterbox_coll,attachments_coll,version_attachments_coll}
    - mkdir -p /opt/maarch/docservers/{ai,manual,manual_attachments,templates}
    - mkdir -p /opt/maarch/docservers/{convert_attachments,convert_attachments_version,convert_mlb}
    - mkdir -p /opt/maarch/docservers/{fulltext_attachments,fulltext_attachments_version,fulltext_mlb}
    - mkdir -p /opt/maarch/docservers/{thumbnails_attachments,thumbnails_attachments_version,thumbnails_mlb}
    - mkdir -p /var/www/html/
    - cp -R /builds/maarch/MaarchCourrier/ /var/www/html/
    - cd /var/www/html/MaarchCourrier
    - mkdir -p /var/www/html/MaarchCourrier
    #- curl -sL https://deb.nodesource.com/setup_7.x | bash - 
    #- apt-get install -yqq nodejs 
    #- npm install npm@latest -g 
    #- npm set registry https://registry.npmjs.org/ 
    #- npm install
    - sed 's/<databaseserver>.*<\/databaseserver>/<databaseserver>postgres<\/databaseserver>/;s/<databasepassword>.*<\/databasepassword>/<databasepassword><\/databasepassword>/;s/<databasename>.*<\/databasename>/<databasename>MaarchCourrier<\/databasename>/;s/<databaseuser>.*<\/databaseuser>/<databaseuser>maarch<\/databaseuser>/' apps/maarch_entreprise/xml/config.xml.default > apps/maarch_entreprise/xml/config.xml
92
    - curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-8.phar
93
    - chmod +x /usr/local/bin/phpunit
94
    - phpunit --coverage-text --colors=never -c phpunit.xml
95 96
  only:
    - develop