From: Blackeye Date: Tue, 3 Feb 2026 22:19:50 +0000 (+0100) Subject: rearanged anchors and added linting proposal X-Git-Tag: 4.7.2~11^2~1 X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/commitdiff_plain/b04ccafc5811888bfeef9a90f20c3cceaa408a02 rearanged anchors and added linting proposal --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 627ed17..884dab3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,10 +3,12 @@ cache: paths: - vendor/ -# Run tests for php:8.2 -job_lint_app_82: - image: php:8.2 - before_script: &before_linter_script +# Aliases and Anchors for reuse + +.linter_script: &linter_script + - ./vendor/bin/parallel-lint --gitlab --exclude vendor . + - ./vendor/bin/php-cs-fixer -vvv check . --using-cache=no --rules=@PSR12,-single_space_around_construct +.before_script: &before_linter_script # Install git, the docker php image doesn't have it installed by default - apt-get update -yqq - apt-get install git -yqq @@ -20,21 +22,60 @@ job_lint_app_82: - php composer.phar require --dev friendsofphp/php-cs-fixer:3.64.0 # Install all project dependencies - php composer.phar install - script: &linter_script - - ./vendor/bin/parallel-lint --exclude vendor . - - ./vendor/bin/php-cs-fixer -vvv check . --using-cache=no --rules=@PSR12,-single_space_around_construct + +.enableWarningOnFailure: &linter_warning + allow_failure: + exit_codes: + - 1 + + +# Run tests for php:8.5 +job_lint_app_85: + image: php:8.5 + before_script: *before_linter_script + script: *linter_script + +# Run tests for php:8.4 +job_lint_app_84: + image: php:8.4 + before_script: *before_linter_script + script: *linter_script + +job_lint_app_83: + image: php:8.3 + before_script: *before_linter_script + script: *linter_script + +# Run tests for php:8.2 +job_lint_app_82: + image: php:8.2 + before_script: *before_linter_script + script: *linter_script + + +# ================= +# Deprecated ones START +# ================= # Run tests for php:8.1 job_lint_app_81: image: php:8.1 before_script: *before_linter_script script: *linter_script + <<: *linter_warning + + # Run tests for php:7.4 job_lint_app_74: image: php:7.4 before_script: *before_linter_script script: *linter_script + <<: *linter_warning + +# ================= +# Deprecated ones END +# ================= publish: image: docker:latest