Created
February 16, 2017 21:44
-
-
Save RichVRed/2adae7f21a2951a77b286dd3b2c47f3e to your computer and use it in GitHub Desktop.
GitLab CI Static/Dynamic Code Analyzers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Composer stores all downloaded packages in the vendor/ directory. | |
| # Composer bin directory is set to bin/ directory. | |
| cache: | |
| paths: | |
| - vendor/ | |
| - bin/ | |
| before_script: | |
| - composer install --quiet | |
| stages: | |
| - 'docker' | |
| - 'composer' | |
| - 'fixer' | |
| - 'lint' | |
| - 'test T.D.D.' | |
| - 'test B.D.D.' | |
| clean_containers: | |
| stage: 'docker' | |
| script: | |
| - $(docker ps --quiet --filter=status=dead --filter=status=exited -a) | xargs -r docker rm -v | |
| clean_images: | |
| stage: 'docker' | |
| script: | |
| - docker images --quiet --filter=dangling=true --no-trunc | xargs -r docker rmi 2> /dev/null | |
| clean_volumes: | |
| stage: 'docker' | |
| script: | |
| - $(docker volume ls --quiet --filter=dangling=true) | xargs -r docker volume rm | |
| composer: | |
| stage: 'composer' | |
| script: | |
| - composer validate | |
| php-formatter: | |
| stage: 'fixer' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/php-formatter" formatter:use:sort src/ | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/php-formatter" formatter:strict:fix src/ | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/php-formatter" formatter:header:fix src/ | |
| phpmd: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpmd" src text cleancode,codesize,controversial,design,naming,unusedcode | |
| phpcs: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpcs:latest" --config-set colors=1 --standard=PSR2 -v src | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpcs:latest" --config-set colors=1 --standard=PHPCompatibility --runtime-set testVersion 5.4 -v src | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpcs:latest" --config-set colors=1 --standard=PHPCompatibility --runtime-set testVersion 5.6 -v src | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpcs:latest" --config-set colors=1 --standard=PHPCompatibility --runtime-set testVersion 7.0 -v src | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpcs:latest" --config-set colors=1 --standard=PHPCompatibility --runtime-set testVersion 7.1 -v src | |
| phpcpd: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpcpd" src | |
| phpdcd: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpdcd" src | |
| phpsa: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpsa:latest" check src | |
| phpa: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpa" src | |
| phpanalysis: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpanalysis" src | |
| pdepend: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/pdepend" src | |
| phan: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phan" --output-mode text --signature-compatibility --directory src | |
| psalm: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/psalm" src | |
| phpca: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpca:latest" --no-progress src | |
| php-coupling-detector: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/php-coupling-detector" detect src --config-file=.php_cd --format=dot | |
| php-reaper: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/php-reaper" -d src | |
| parse: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/psecio-parse" -vvv scan src | |
| phpstan: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpstan" analyse --level=5 --no-progress --no-interaction -vvv src | |
| tuli: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/tuli" analyze src | |
| phploc: | |
| stage: 'lint' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phploc" src | |
| phpunit: | |
| stage: 'test T.D.D.' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpunit" tests | |
| phpspec: | |
| stage: 'test B.D.D.' | |
| script: | |
| - docker run --rm --volume $(pwd):/workspace "rvannauker/phpspec" run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment