From 0151b7f7e611a2d4ec63ad5f0e132bf61677c43a Mon Sep 17 00:00:00 2001 From: Perreal Guillaume <guillaume.perreal@irstea.fr> Date: Fri, 5 Jul 2019 17:04:04 +0200 Subject: [PATCH] CI: utilisation de pole-is/tools/ci-config 1.2.0. --- .gitlab-ci.yml | 56 +++++++------------------------------------------- 1 file changed, 7 insertions(+), 49 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81eb619..3fea22e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,58 +1,16 @@ -stages: - - vendor - - test +include: + - project: pole-is/tools/ci-config + ref: "1.2.0" + file: /php-package-ci.yml -.php: &php - tags: - - docker - variables: - DEBIAN_FRONTEND: noninteractive - COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.composer-cache" - PHP_VERSION: "7.1" - image: gitlab-registry.irstea.fr/pole-is/docker/php:stretch-${PHP_VERSION} +.php: before_script: - apt-get update -yq && apt-get install -yq php${PHP_VERSION}-sqlite - - php -v - - composer -V -vendor: - <<: *php - stage: vendor - dependencies: [] - script: - - 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_CACHE_DIR" - -.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:composer-validate: { <<: *php-test } -test:composer-require: { <<: *php-test } -test:security: { <<: *php-test } -test:console: { <<: *php-test } +test:console: + extends: .php-test test:phpunit: - <<: *php-test - script: - - composer test:phpunit -- --colors=never coverage: '/^\s*Lines:\s*\d+.\d+\%/' artifacts: reports: -- GitLab