ci: update CI images and optimize composer install commands

Changed CI images to use a specific docker image and optimized composer install commands for better performance.
This commit is contained in:
Jérémy Munsch 2026-10-06 15:02:44 +02:00
parent 62c221f6b6
commit 25cc3e982e
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4

View file

@ -26,7 +26,7 @@ include:
# * LINT --------------------------------------------------------------------
.php-lint-base: &php-lint-base
image: composer:2.10
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-ci-8.5:latest
variables:
COMPOSER_CACHE_DIR: ".composer-cache"
cache:
@ -39,9 +39,8 @@ include:
- .composer-cache/
- vendor/
before_script:
- apk add --no-cache icu-dev && docker-php-ext-install bcmath intl
- composer config gitlab-token.lab.s-web.fr "${CI_DEPLOY_USER}" "${CI_DEPLOY_PASSWORD}"
- composer install --no-interaction --optimize-autoloader --no-scripts --ignore-platform-req=ext-oci8
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts --no-interaction --no-ansi --no-progress --prefer-dist --ignore-platform-req=ext-oci8
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "develop"
@ -67,7 +66,7 @@ phpcs:
- vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=vendor/*,storage/*,bootstrap/*,node_modules/* --report=junit --report-file=phpcs-report.xml
artifacts:
when: on_failure
expose_as: 'phpcs'
expose_as: "phpcs"
paths:
- phpcs-report.xml
reports:
@ -84,7 +83,7 @@ phpstan:
- php -d memory_limit=512M vendor/bin/phpstan --error-format=junit > phpstan-report.xml
artifacts:
when: on_failure
expose_as: 'phpstan'
expose_as: "phpstan"
paths:
- phpstan-report.xml
reports:
@ -95,7 +94,7 @@ phpstan:
tests_laravel:
stage: test
image: composer:2.10
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-ci-8.5:latest
allow_failure: false
variables:
COMPOSER_CACHE_DIR: ".composer-cache"
@ -109,9 +108,8 @@ tests_laravel:
- .composer-cache/
- vendor/
before_script:
- apk add --no-cache $PHPIZE_DEPS linux-headers icu-dev && docker-php-ext-install bcmath intl && pecl install pcov && docker-php-ext-enable pcov
- composer config gitlab-token.lab.s-web.fr "${CI_DEPLOY_USER}" "${CI_DEPLOY_PASSWORD}"
- composer install --no-interaction --prefer-dist --optimize-autoloader --no-scripts --ignore-platform-req=ext-oci8
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts --no-interaction --no-ansi --no-progress --prefer-dist --ignore-platform-req=ext-oci8
script:
- cp .env.testing .env
- php artisan key:generate
@ -121,7 +119,7 @@ tests_laravel:
- if [ "$CI_JOB_STATUS" == "failed" ]; then cat storage/logs/laravel.log; fi
artifacts:
when: always
expose_as: 'coverage'
expose_as: "coverage"
paths:
- coverage/html/
reports: