From 95fc680bfa4375d87498b93fe5fe2c839c62fca9 Mon Sep 17 00:00:00 2001
From: Perreal Guillaume <guillaume.perreal@irstea.fr>
Date: Wed, 10 Apr 2019 11:32:39 +0200
Subject: [PATCH] =?UTF-8?q?Configuration=20de=20l'int=C3=A9gration=20conti?=
 =?UTF-8?q?nue.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..d702d97
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,54 @@
+stages:
+  - vendor
+  - test
+
+.php: &php
+  tags:
+    - docker
+  image: php:${PHP_VERSION}-cli-stretch
+  variables:
+    COMPOSER_HOME: "$CI_PROJECT_DIR/.composer"
+    COMPOSER_NO_INTERACTION: "1"
+    COMPOSER_ALLOW_SUPERUSER: "1"
+    COMPOSER_INSTALLER_COMMITID: "5eb0614d3fa7130b363698d3dca52c619b463615"
+    PHP_VERSION: "7.1"
+  before_script:
+    - apt-get update -yqq && apt-get install -yqq unzip git-core
+    - php -v
+    - curl -sSfL https://raw.githubusercontent.com/composer/getcomposer.org/${COMPOSER_INSTALLER_COMMITID}/web/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
+    - composer -V
+
+vendor:
+  <<: *php
+  stage: vendor
+  dependencies: []
+  script:
+    - composer global require hirak/prestissimo --quiet
+    - composer install --no-suggest --no-progress
+  artifacts:
+    name: "$CI_JOB_NAME"
+    paths:
+      - vendor
+    expire_in: 4 hours
+  cache:
+    key: "$CI_BUILD_REF_NAME-composer"
+    paths:
+      - "$COMPOSER_HOME"
+
+.php-test: &php-test
+  <<: *php
+  stage: test
+  dependencies:
+    - vendor
+  script: composer ${CI_JOB_NAME}
+
+phploc: { <<: *php-test }
+
+test:lint: { <<: *php-test }
+test:phpcpd: { <<: *php-test }
+test:phpmd: { <<: *php-test }
+test:phpstan: { <<: *php-test }
+test:phpunit: { <<: *php-test }
+test:composer-validate: { <<: *php-test }
+test:composer-require: { <<: *php-test }
+test:security: { <<: *php-test }
-- 
GitLab