gitlab-ci.bundle.yml 759 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

.defaults: &defaults
  tags: [ docker ]
  image: isdevtools.irstea.fr/poleis/php-analysis:7.1

phploc:
  <<: *defaults
  script: phploc src

lint:
  <<: *defaults
  script:
    - parallel-lint -j $(nproc) src
    - twig-lint lint src
    - yaml-lint src

php-cs-fixer:
  <<: *defaults
  script: php-cs-fixer fix --dry-run --verbose

phpcpd:
  <<: *defaults
  script: phpcpd --fuzzy src

.with-vendors: &with-vendors
  <<: *defaults
  before_script:
    - composer install --prefer-dist --no-progress --no-suggest
  cache:
    key: "$CI_COMMIT_REF_NAME"
    paths:
      - /composer/cache

composer-require-checker:
  <<: *with-vendors
  script: composer-require-checker

phpmd:
  <<: *with-vendors
  script: phpmd src text ./phpmd-ruleset.xml --suffixes=php