.gitlab-ci.yml 1.61 KB
Newer Older
Thomas Citharel's avatar
Thomas Citharel committed
1 2
# This file is a template, and might need editing before it works on your project.
# Select image from https://hub.docker.com/_/php/
3
test_php7.0:
Thomas Citharel's avatar
Thomas Citharel committed
4
  stage: test
5
  image: framasoft/framasite-php-7.0:latest
6 7
  script:
    - ant prepare-pgsql
8
    - ./vendor/bin/simple-phpunit -v
9 10

test_php7.1:
Thomas Citharel's avatar
Thomas Citharel committed
11
  stage: test
12
  image: framasoft/framasite-php-7.1:latest
13 14
  script:
    - ant prepare-pgsql
15 16
    - ./vendor/bin/simple-phpunit -v

Thomas Citharel's avatar
Thomas Citharel committed
17 18
pages:
  stage: deploy
19
  image: framasoft/framasite-php-7.1:latest
Thomas Citharel's avatar
Thomas Citharel committed
20
  script:
Thomas Citharel's avatar
Thomas Citharel committed
21
    - ant prepare-pgsql
22
    - ./vendor/bin/simple-phpunit -v --coverage-text --colors=never --coverage-html public
Thomas Citharel's avatar
Thomas Citharel committed
23 24
  only:
    - master
Thomas Citharel's avatar
Thomas Citharel committed
25 26 27 28 29 30
  artifacts:
    paths:
      - public
    expire_in: 30 days
  only:
    - master
31

Thomas Citharel's avatar
Thomas Citharel committed
32 33 34 35 36 37
cache:
  paths:
  - vendor/
  - node_modules

before_script:
38
- cp app/config/tests/parameters_test.pgsql.yml app/config/parameters_test.yml
39
- SYMFONY_ENV=test php /usr/bin/composer.phar install -o  --no-interaction --no-progress --prefer-dist
40
#  - npm install TODO: Activate me later
 JosephK's avatar
JosephK committed
41 42
- git clone https://framagit.org/framasoft/Framasite-/framasite-grav grav
- git clone https://framagit.org/framasoft/Framasite-/framasite-doku doku
Thomas Citharel's avatar
Thomas Citharel committed
43
- git clone https://framagit.org/framasoft/PrettyNoemieCMS
44 45
- mkdir blog/users -p
- mkdir wiki/users -p
Thomas Citharel's avatar
Thomas Citharel committed
46
- mkdir single_page/users -p
47
- npm install
Thomas Citharel's avatar
Thomas Citharel committed
48 49 50 51 52 53 54 55 56 57 58 59 60

# 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/ce/ci/services/README.html for examples.
services:
  - postgres:latest

# Set any variables we need
variables:
  POSTGRES_DB: framasite_test
  POSTGRES_USER: ci
  POSTGRES_PASSWORD: test
  TIMEZONE: "Europe/Paris"