diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cab890e9058007f8509c0dc202c5e99a7c872923..64359cf81818d5586bf6dba218ccd33eb9070960 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,66 +1,33 @@
-stages:
- - without-vendors
- - with-vendors
-
-.without-vendors: &without-vendors
- tags: [ docker ]
- stage: without-vendors
- image: isdevtools.irstea.fr/poleis/php-analysis:7.1
- dependencies: []
+include:
+ - project: pole-is/tools/ci-config
+ ref: "2.0.0"
+ file: /php-package-ci.yml
+ - project: pole-is/tools/ci-config
+ ref: "2.0.0"
+ file: /satis-ci.yml
-phploc:
- <<: *without-vendors
- script: phploc src tests
-
-lint:
- <<: *without-vendors
- script:
- - parallel-lint -j $(nproc) src tests
- - twig-lint lint src
- - yaml-lint src
-
-php-cs-fixer:
- <<: *without-vendors
- script: php-cs-fixer fix --dry-run --verbose
+stages:
+ - vendor
+ - test
+ - deploy
-phpcpd:
- <<: *without-vendors
- script: phpcpd --fuzzy src tests
+# Personnalisation des tâches par défaut:
-install-vendors:
- <<: *without-vendors
- image: isdevtools.irstea.fr/poleis/php-apache2:stretch-7.1
+.php:
variables:
- S6_TARGET: none
- COMPOSER_NO_INTERACTION: "1"
+ DEBIAN_CODENAME: "stretch"
+ PHP_VERSION: "7.1"
+
+test:phpunit:
+# variables:
+# PHP_IMAGE: gitlab-registry.irstea.fr/pole-is/docker/php/ci/panther
script:
- - phpenmod iconv
- - composer validate
- - composer install -n --prefer-dist --no-suggest --no-progress --no-scripts --ignore-platform-reqs
- cache:
- key: "$CI_COMMIT_REF_NAME-composer-cache"
- paths:
- - /composer/cache
+ - composer test:phpunit -- --coverage-text --coverage-html=reports/coverage --log-junit=reports/junit.xml
artifacts:
- name: vendors
+ name: reports
+ expose_as: "phpunit reports"
+ when: always
paths:
- - vendor
- expire_in: "1 day"
-
-.with-vendors: &with-vendors
- <<: *without-vendors
- stage: with-vendors
- dependencies: [ install-vendors ]
-
-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
-
+ - reports/
+ reports:
+ junit: reports/junit.xml