Skip to content

Instantly share code, notes, and snippets.

@ahmed-bhs
Created March 18, 2020 13:41
Show Gist options
  • Select an option

  • Save ahmed-bhs/0e47cdadbbb55b462c8508f194c9dc21 to your computer and use it in GitHub Desktop.

Select an option

Save ahmed-bhs/0e47cdadbbb55b462c8508f194c9dc21 to your computer and use it in GitHub Desktop.

Revisions

  1. ahmed-bhs created this gist Mar 18, 2020.
    46 changes: 46 additions & 0 deletions gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    stages:
    - lint
    - test
    test:
    stage: test
    image: edbizarro/gitlab-ci-pipeline-php:7.4-alpine
    script:
    - composer install --prefer-dist --no-ansi --no-interaction --no-progress

    phpstan:
    image: jakzal/phpqa
    stage: test
    script: phpstan analyse --level 2 -c ./ci/phpstan.neon src
    allow_failure: true

    php-metrics:
    image: jakzal/phpqa
    stage: lint
    script: phpmetrics --report-html=var/php-metrics src
    artifacts:
    paths:
    - var/php-metrics/
    allow_failure: true

    php-phpmd:
    image: jakzal/phpqa
    stage: lint
    script: phpmd src text ./ci/phpmd.xml
    artifacts:
    paths:
    - var/phpmd.html
    allow_failure: true

    php-deprecation-detector:
    image: jakzal/phpqa
    stage: lint
    script:
    - deprecation-detector check src vendor
    allow_failure: true

    lint:php:
    stage: lint
    image: sixlive/php-lint-fix
    script:
    - php-cs-fixer fix --dry-run --diff
    allow_failure: true