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/
node_modules/*
.php_cs.cache
.cache/*
###> symfony/framework-bundle ###
/.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
# See http://docs.gitlab.com/ee/ci/services/README.html for examples.
services:
- name: postgis/postgis:12-3.1-alpine
- name: postgis/postgis:14-3.3-alpine
alias: db
- name: redis
alias: redis
@ -21,7 +21,7 @@ variables:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# 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
GIT_SUBMODULE_STRATEGY: recursive
REDIS_HOST: redis
@ -37,7 +37,7 @@ stages:
build:
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:
- curl -sS https://getcomposer.org/installer | php
- php -d memory_limit=2G composer.phar config -g cache-dir "$(pwd)/.cache"
@ -54,9 +54,13 @@ build:
code_style:
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:
- php-cs-fixer fix --dry-run -v --show-progress=none
- bin/grumphp run --tasks=phpcsfixer
cache:
paths:
- .php_cs.cache
artifacts:
expire_in: 30 min
paths:
@ -65,9 +69,11 @@ code_style:
phpstan_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:
- bin/grumphp run --tasks=phpstan
- bin/phpstan
cache:
./.cache
artifacts:
expire_in: 30 min
paths:
@ -76,9 +82,9 @@ phpstan_tests:
psalm_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:
- bin/grumphp run --tasks=psalm
- bin/psalm
allow_failure: true
artifacts:
expire_in: 30 min
@ -88,7 +94,7 @@ psalm_tests:
unit_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:
- php tests/app/bin/console doctrine:migrations:migrate -n
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev

View File

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