diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 183cfe4..0afc2bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,10 +2,33 @@ before_script: - apk add --no-cache make wget git - make install-composer - make install + - mkdir -p result stages: - test +lint:coding-guideline: + image: php:7.0-alpine + stage: test + script: + - ./vendor/bin/phpcs -s + - ./vendor/bin/phpcs -s > result/phpcs-summary.txt + artifacts: + when: on_failure + paths: + - result + +lint:php-mass-detection: + image: php:7.0-alpine + stage: test + script: + - ./vendor/bin/phpmd src text phpmd.xml > result/phpmd.txt + - ./vendor/bin/phpmd src html phpmd.xml > result/phpmd.html + artifacts: + when: on_failure + paths: + - result + test:5.6: image: php:5.6-alpine stage: test @@ -18,4 +41,10 @@ test:7.0: script: - ./vendor/bin/phpunit +test:latest: + image: php:7-alpine + stage: test + script: + - ./vendor/bin/phpunit + # Further stages, and jobs e.g. linting, cgl, etc. diff --git a/composer.json b/composer.json index 0db31eb..ec779e3 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,13 @@ "name": "siepmann/typo3_update", "description": "Auto migrate PHP Source of extensions to be compatible.", "type": "project", + "license": "GPL-2.0+", + "authors": [ + { + "name": "Daniel Siepmann", + "email": "coding@daniel-siepmann.de" + } + ], "autoload": { "psr-4": { "Typo3Update\\Tests\\": "tests/", @@ -22,15 +29,10 @@ "squizlabs/php_codesniffer": "2.8.*", "symfony/yaml": "3.2.*" }, - "license": "GPL-2.0+", - "authors": [ - { - "name": "Daniel Siepmann", - "email": "coding@daniel-siepmann.de" - } - ], "require-dev": { - "phpunit/phpunit": "^5.7", - "symfony/finder": "^3.2" + "phpunit/phpunit": "5.7.*", + "symfony/finder": "3.2.*", + "phpmd/phpmd": "2.6.*", + "pdepend/pdepend": "2.5.*" } } diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..c742021 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,22 @@ + + + The coding standard for this Project + + ./src + ./tests + */Fixtures/* + + + + *Sniff.php$ + */Tokenizers/* + + + *Sniff.php$ + */Tokenizers/* + + + *Sniff.php$ + */Tokenizers/* + + diff --git a/phpmd.xml b/phpmd.xml new file mode 100644 index 0000000..829b5eb --- /dev/null +++ b/phpmd.xml @@ -0,0 +1,19 @@ + + + + My custom rule set that checks my code... + + + + + + + + +