Commit f4566946 authored by Guillaume Perréal's avatar Guillaume Perréal

Utilise ci-config 2.0.0 pour l'intégration continue.

parent 5b4d7c4e
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment