From ea24f97bf25bfe63cbe41670ebe5ef0485c5915d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr> Date: Wed, 11 Dec 2019 16:18:14 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9liore=20les=20tests=20en=20CI=20sur=20P?= =?UTF-8?q?HP=207.1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93913b9..4f5e36d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,29 +2,33 @@ stages: - test - deploy -.test: &test +.test: stage: test tags: [docker] image: gitlab-registry.irstea.fr/pole-is/docker/php:buster-${CI_JOB_NAME} variables: COMPOSER_CACHE_DIR: "${CI_PROJECT_DIR}/.composer-cache" + COMPOSER_OPTS: "" before_script: - php -v - composer -V script: - - composer install + - composer install $COMPOSER_OPTS - php -l src/*.php - vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no + - vendor/bin/phpunit cache: key: "composer-cache-${CI_COMMIT_REF_NAME}" paths: - "${COMPOSER_CACHE_DIR}" "7.1": - <<: *test + extends: .test + variables: + COMPOSER_OPTS: "--prefer-lowest --prefer-stable" "7.3": - <<: *test + extends: .test deploy: stage: deploy -- GitLab