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

CI: n'installe qu'une seule fois les vendors.

Showing with 32 additions and 10 deletions
+32 -10
stages:
- without-vendors
- with-vendors
.defaults: &defaults .without-vendors: &without-vendors
tags: [ docker ] tags: [ docker ]
stage: without-vendors
image: isdevtools.irstea.fr/poleis/php-analysis:7.1 image: isdevtools.irstea.fr/poleis/php-analysis:7.1
dependencies: []
phploc: phploc:
<<: *defaults <<: *without-vendors
script: phploc src tests script: phploc src tests
lint: lint:
<<: *defaults <<: *without-vendors
script: script:
- parallel-lint -j $(nproc) src tests - parallel-lint -j $(nproc) src tests
- twig-lint lint src - twig-lint lint src
- yaml-lint src - yaml-lint src
php-cs-fixer: php-cs-fixer:
<<: *defaults <<: *without-vendors
script: php-cs-fixer fix --dry-run --verbose script: php-cs-fixer fix --dry-run --verbose
phpcpd: phpcpd:
<<: *defaults <<: *without-vendors
script: phpcpd --fuzzy src tests script: phpcpd --fuzzy src tests
.with-vendors: &with-vendors install-vendors:
<<: *defaults <<: *without-vendors
before_script: image: isdevtools.irstea.fr/poleis/php-apache2:stretch-7.1
- composer install --prefer-dist --no-progress --no-suggest variables:
S6_TARGET: none
COMPOSER_NO_INTERACTION: "1"
script:
- phpenmod iconv
- composer validate
- composer install -n --prefer-dist --no-suggest --no-progress --no-scripts --ignore-platform-reqs
cache: cache:
key: "$CI_COMMIT_REF_NAME" key: "$CI_COMMIT_REF_NAME-composer-cache"
paths: paths:
- /composer/cache - /composer/cache
artifacts:
name: vendors
paths:
- vendor
expire_in: "1 day"
.with-vendors: &with-vendors
<<: *without-vendors
stage: with-vendors
dependencies: [ install-vendors ]
phpunit: phpunit:
<<: *with-vendors <<: *with-vendors
...@@ -42,3 +63,4 @@ composer-require-checker: ...@@ -42,3 +63,4 @@ composer-require-checker:
phpmd: phpmd:
<<: *with-vendors <<: *with-vendors
script: phpmd src,tests text ./phpmd-ruleset.xml --suffixes=php script: phpmd src,tests text ./phpmd-ruleset.xml --suffixes=php
Supports Markdown
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