Commit 2604cd5a authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

CI: simplification de la configuration.

parent de439691
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
paths:
- $HOME/.composer/cache
- vendor/
variables:
COMPOSER_NO_INTERACTION: "1"
COMPOSER_ALLOW_SUPERUSER: "1"
S6_TARGET: none
DEBIAN_FRONTEND: noninteractive
.defaults: &defaults
tags: [ docker ]
image: isdevtools.irstea.fr/poleis/php-analysis:7.1
phpunit:
stage: test
tags: [docker]
image: isdevtools.irstea.fr/poleis/php-apache2:stretch-7.1
<<: *defaults
before_script:
- phpenmod pdo_sqlite curl
- composer update --prefer-dist --no-progress --ansi --no-suggest --prefer-stable
- composer install --prefer-dist --no-progress --no-suggest
script:
- vendor/bin/phpunit
.static-analysis: &static-analysis
stage: test
tags: [docker]
image: isdevtools.irstea.fr/poleis/php-analysis:7.1
cache:
key: "$CI_COMMIT_REF_NAME"
paths:
- vendor
phploc:
<<: *static-analysis
script:
- phploc --exclude=vendor .
<<: *defaults
script: phploc --exclude=vendor .
lint:
<<: *static-analysis
script:
- parallel-lint -j $(nproc) --exclude vendor .
<<: *defaults
script: parallel-lint -j $(nproc) --exclude vendor .
phpcs:
<<: *static-analysis
script:
- phpcs --colors --parallel=$(nproc) .
<<: *defaults
script: phpcs --colors --parallel=$(nproc) .
allow_failure: true
phpcpd:
<<: *static-analysis
script:
- phpcpd --exclude=vendor --fuzzy .
<<: *defaults
script: phpcpd --exclude=vendor --fuzzy .
phpmd:
<<: *static-analysis
script:
- phpmd . text ./phpmd.xml --suffixes=php
<<: *defaults
script: phpmd . text ./phpmd.xml --suffixes=php
allow_failure: true
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