From d8bb5d3bcb37cb63d6e41b51e1365d1f43158bde Mon Sep 17 00:00:00 2001
From: Perreal Guillaume <guillaume.perreal@irstea.fr>
Date: Fri, 19 Apr 2019 11:56:53 +0200
Subject: [PATCH] CI: utilise l'image PHP de la registry Irstea pour les tests.

---
 .gitlab-ci.yml | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 93605c0..e1c5662 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,24 +5,20 @@ stages:
 .test: &test
   stage: test
   tags: [docker]
-  image: php:${CI_JOB_NAME}-cli-alpine
+  image: gitlab-registry.irstea.fr/pole-is/docker/php:stretch-${CI_JOB_NAME}
   variables:
-    COMPOSER_ALLOW_SUPERUSER: "1"
+    COMPOSER_CACHE_DIR: "${CI_PROJECT_DIR}/.composer-cache"
   before_script:
-    - curl -sSL https://github.com/composer/composer/releases/download/1.8.4/composer.phar --output /usr/local/bin/composer
-    - chmod +x /usr/local/bin/composer
-    - apk update && apk add unzip git
     - php -v
     - composer -V
-    - composer global require hirak/prestissimo
   script:
     - composer install
     - php -l src/*.php
     - vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no
   cache:
-    key: composer-cache
+    key: "composer-cache-${CI_COMMIT_REF_NAME}"
     paths:
-      - /root/.composer/cache
+      - "${COMPOSER_CACHE_DIR}"
 
 "7.0":
   <<: *test
-- 
GitLab