ldc-shared-ci/lint/rector.yml
2026-08-21 12:37:08 +02:00

31 lines
No EOL
813 B
YAML

spec:
inputs:
enable_rector:
default: false
type: boolean
---
rector:
stage: lint
image: composer:2.10
cache:
key: rector-cache-$CI_COMMIT_REF_SLUG
paths:
- vendor/
- .rector-cache/
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts --no-interaction
script:
- vendor/bin/rector process --dry-run --no-progress-bar --output-format=junit > rector-report.xml
artifacts:
when: always
expose_as: 'rector'
paths:
- rector-report.xml
reports:
junit: rector-report.xml
allow_failure: true
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && "$[[ inputs.enable_rector ]]" == "true"'