Skip to content

Latest commit

 

History

History
84 lines (54 loc) · 2.3 KB

File metadata and controls

84 lines (54 loc) · 2.3 KB

Continuous integration

Purpose of this documentation is to describe the CI pipeline used by the application.

Table of contents

Pull request CI pipeline

The application uses Jenkins for pull request CI integration. The configuration can be checked in the Jenkinsfile configuration file.

Currently, the following checks are included:

PHPUnit & Infection

Tool Metric Threshold
PHPUnit Code coverage 100%
Infection Mutation score indicator 99%

To run phpunit and infection together with clover coverage report generated:

$ docker container exec -it simple-roster-phpfpm bash -c "source .env.test && vendor/bin/infection --threads=$(nproc) --min-msi=99 --test-framework-options="--coverage-clover=var/log/phpunit/coverage.xml""

Configuration files:

To verify the code coverage:

$ docker container exec -it simple-roster-phpfpm bin/coverage-checker var/log/phpunit/coverage.xml 100

Static code analysis

PHP CodeSniffer

To run static code analysis with PHP CodeSniffer execute:

$ docker container exec -it simple-roster-phpfpm vendor/bin/phpcs -p

Configuration file: phpcs.xml

PHP Mess Detector

To run static code analysis with PHP Mess Detector execute:

$ docker container exec -it simple-roster-phpfpm vendor/bin/phpmd src,tests json phpmd.xml

Configuration file: phpmd.xml

PHPStan

To run static code analysis with PHPStan execute:

$ docker container exec -it simple-roster-phpfpm vendor/bin/phpstan analyse

Configuration file: phpstan.neon

Psalm

To run static code analysis with Psalm execute:

$ docker container exec -it simple-roster-phpfpm vendor/bin/psalm