.gitlab-ci.yml 791 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
# Specify docker image
image: debian:stretch

# Define variable to disable SSL verification of GIT
variables:
  GIT_SSL_NO_VERIFY: "true"

# Execute before every job
# Install libperl-critic-perl, php-codesniffer, git and php

# PHP codesniffer
create_php_code_sniffer_rapport:
  only:
    - branches
    - tags
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq php-codesniffer git php-cli
  script:
    - find . -type f -name '*.php' -o -name '*.inc' -exec phpcs --standard=php-codesniffer-rules/FDStandard/ruleset.xml "{}" \;

# PHP lint
create_php_lint_rapport:
  only:
    - branches
    - tags
  before_script:
    - apt-get update -qq
    - apt-get install -y -qq php-cli
  script:
    - find . -type f -name '*.php' -o -name '*.inc' -print0 | xargs -0 -n1 php -l