From 11118452f88a36f20adb8845ea0317be61732b9e Mon Sep 17 00:00:00 2001 From: Nicolas Raidelet <nicolas.raidelet@irstea.fr> Date: Fri, 24 Nov 2017 16:18:25 +0100 Subject: [PATCH] maj ci gitlab --- .gitlab-ci.yml | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3502f67..c9702bc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,39 +3,42 @@ tags: [ docker ] image: isdevtools.irstea.fr/poleis/php-analysis:7.1 -phpunit: - <<: *defaults - before_script: - - composer install --prefer-dist --no-progress --no-suggest - script: - - vendor/bin/phpunit - cache: - key: "$CI_COMMIT_REF_NAME" - paths: - - vendor - phploc: <<: *defaults - script: phploc --exclude=vendor . + script: phploc src tests lint: <<: *defaults - script: parallel-lint -j $(nproc) --exclude vendor . - -phpcs: - <<: *defaults - script: phpcs --colors --parallel=$(nproc) --standard=/rules/phpcs.xml . - allow_failure: true + script: + - parallel-lint -j $(nproc) src tests + - twig-lint lint src + - yaml-lint src php-cs-fixer: <<: *defaults - script: php-cs-fixer fix --dry-run --config=/rules/php-cs-fixer.php + script: php-cs-fixer fix --dry-run --verbose phpcpd: <<: *defaults - script: phpcpd --exclude=vendor --fuzzy . + script: phpcpd --fuzzy src tests -phpmd: +.with-vendors: &with-vendors <<: *defaults - script: phpmd . text /rules/phpmd.xml --suffixes=php - allow_failure: true + before_script: + - composer install --prefer-dist --no-progress --no-suggest + cache: + key: "$CI_COMMIT_REF_NAME" + paths: + - /composer/cache + +phpunit: + <<: *with-vendors + script: vendor/bin/phpunit + +composer-require-checker: + <<: *with-vendors + script: composer-require-checker + +phpmd: + <<: *with-vendors + script: phpmd src,tests text ./phpmd-ruleset.xml --suffixes=php -- GitLab