Add PHPSTAN

This commit is contained in:
Vincent BRIDIER 2024-01-29 09:18:50 +00:00
parent 4f40361f49
commit c53353ca78
2 changed files with 21 additions and 0 deletions

View file

@ -2,6 +2,9 @@ include:
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/phpcs.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/phpstan.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/eslint.yml'

18
lint/phpstan.yml Normal file
View file

@ -0,0 +1,18 @@
phpstan:
stage: lint
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.2:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts
script:
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
artifacts:
when: on_failure
expose_as: 'phpstan'
paths:
- phpstan-report.xml
reports:
junit: phpstan-report.xml
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"