Purpose of this documentation is to describe the CI pipeline used by the application.
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:
| 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 100To run static code analysis with PHP CodeSniffer execute:
$ docker container exec -it simple-roster-phpfpm vendor/bin/phpcs -pConfiguration file: phpcs.xml
To run static code analysis with PHP Mess Detector execute:
$ docker container exec -it simple-roster-phpfpm vendor/bin/phpmd src,tests json phpmd.xmlConfiguration file: phpmd.xml
To run static code analysis with PHPStan execute:
$ docker container exec -it simple-roster-phpfpm vendor/bin/phpstan analyseConfiguration file: phpstan.neon
To run static code analysis with Psalm execute:
$ docker container exec -it simple-roster-phpfpm vendor/bin/psalm