bootstraph ci with php8.2

This commit is contained in:
Julien Fastré 2023-02-17 21:55:52 +01:00
parent 881d76ea1d
commit 16dd816a1a
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
3 changed files with 17 additions and 9 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ composer.lock
docs/build/ docs/build/
node_modules/* node_modules/*
.php_cs.cache .php_cs.cache
.cache/*
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
/.env.local /.env.local

View File

@ -9,7 +9,7 @@ cache:
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service # Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
# See http://docs.gitlab.com/ee/ci/services/README.html for examples. # See http://docs.gitlab.com/ee/ci/services/README.html for examples.
services: services:
- name: postgis/postgis:12-3.1-alpine - name: postgis/postgis:14-3.3-alpine
alias: db alias: db
- name: redis - name: redis
alias: redis alias: redis
@ -21,7 +21,7 @@ variables:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
# configure database access # configure database access
DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=12&charset=utf8 DATABASE_URL: postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8
# fetch the chill-app using git submodules # fetch the chill-app using git submodules
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
REDIS_HOST: redis REDIS_HOST: redis
@ -37,7 +37,7 @@ stages:
build: build:
stage: Composer install stage: Composer install
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
before_script: before_script:
- curl -sS https://getcomposer.org/installer | php - curl -sS https://getcomposer.org/installer | php
- php -d memory_limit=2G composer.phar config -g cache-dir "$(pwd)/.cache" - php -d memory_limit=2G composer.phar config -g cache-dir "$(pwd)/.cache"
@ -54,9 +54,13 @@ build:
code_style: code_style:
stage: Tests stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script: script:
- php-cs-fixer fix --dry-run -v --show-progress=none
- bin/grumphp run --tasks=phpcsfixer - bin/grumphp run --tasks=phpcsfixer
cache:
paths:
- .php_cs.cache
artifacts: artifacts:
expire_in: 30 min expire_in: 30 min
paths: paths:
@ -65,9 +69,11 @@ code_style:
phpstan_tests: phpstan_tests:
stage: Tests stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script: script:
- bin/grumphp run --tasks=phpstan - bin/phpstan
cache:
./.cache
artifacts: artifacts:
expire_in: 30 min expire_in: 30 min
paths: paths:
@ -76,9 +82,9 @@ phpstan_tests:
psalm_tests: psalm_tests:
stage: Tests stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script: script:
- bin/grumphp run --tasks=psalm - bin/psalm
allow_failure: true allow_failure: true
artifacts: artifacts:
expire_in: 30 min expire_in: 30 min
@ -88,7 +94,7 @@ psalm_tests:
unit_tests: unit_tests:
stage: Tests stage: Tests
image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
script: script:
- php tests/app/bin/console doctrine:migrations:migrate -n - php tests/app/bin/console doctrine:migrations:migrate -n
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev - php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev

View File

@ -2,6 +2,7 @@ parameters:
level: 5 level: 5
paths: paths:
- src/ - src/
tmpDir: .cache/
reportUnmatchedIgnoredErrors: true reportUnmatchedIgnoredErrors: true
excludePaths: excludePaths:
- .php_cs* - .php_cs*