ldc-shared-ci/lint/rector.yml

31 lines
813 B
YAML
Raw Permalink Normal View History

2026-08-03 10:40:56 +02:00
spec:
inputs:
enable_rector:
default: false
type: boolean
---
rector:
stage: lint
2026-08-21 12:37:08 +02:00
image: composer:2.10
2026-08-03 10:40:56 +02:00
cache:
key: rector-cache-$CI_COMMIT_REF_SLUG
paths:
2026-08-21 12:37:08 +02:00
- vendor/
2026-08-03 10:40:56 +02:00
- .rector-cache/
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
2026-08-21 12:37:08 +02:00
- composer install --no-scripts --no-interaction
2026-08-03 10:40:56 +02:00
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"'