mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
110 lines
3.1 KiB
YAML
110 lines
3.1 KiB
YAML
---
|
|
|
|
# Select what we should cache between builds
|
|
cache:
|
|
paths:
|
|
- tests/app/vendor/
|
|
- .cache
|
|
- .php_cs.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:14-3.3-alpine
|
|
alias: db
|
|
- name: redis
|
|
alias: redis
|
|
|
|
# Set any variables we need
|
|
variables:
|
|
GIT_DEPTH: 1
|
|
# Configure postgres environment variables (https://hub.docker.com/r/_/postgres/)
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
# configure database access
|
|
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
|
|
REDIS_PORT: 6379
|
|
REDIS_URL: redis://redis:6379
|
|
# change vendor dir to make the app install into tests/apps
|
|
COMPOSER_VENDOR_DIR: tests/app/vendor
|
|
DEFAULT_CARRIER_CODE: BE
|
|
|
|
stages:
|
|
- Composer install
|
|
- Tests
|
|
|
|
build:
|
|
stage: Composer install
|
|
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"
|
|
script:
|
|
- php -d memory_limit=2G composer.phar install --optimize-autoloader --no-ansi --no-interaction --no-progress
|
|
cache:
|
|
paths:
|
|
- .cache/
|
|
artifacts:
|
|
expire_in: 30 min
|
|
paths:
|
|
- bin
|
|
- tests/app/vendor/
|
|
|
|
code_style:
|
|
stage: Tests
|
|
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:
|
|
- bin
|
|
- tests/app/vendor/
|
|
|
|
phpstan_tests:
|
|
stage: Tests
|
|
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
|
|
script:
|
|
- bin/phpstan
|
|
cache:
|
|
- .cache/
|
|
artifacts:
|
|
expire_in: 30 min
|
|
paths:
|
|
- bin
|
|
- tests/app/vendor/
|
|
|
|
psalm_tests:
|
|
stage: Tests
|
|
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
|
|
script:
|
|
- bin/psalm
|
|
allow_failure: true
|
|
artifacts:
|
|
expire_in: 30 min
|
|
paths:
|
|
- bin
|
|
- tests/app/vendor/
|
|
|
|
unit_tests:
|
|
stage: Tests
|
|
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
|
|
- php -d memory_limit=3G tests/app/bin/console doctrine:fixtures:load -n
|
|
- php -d memory_limit=2G tests/app/bin/console cache:clear --env=test
|
|
- php -d memory_limit=4G bin/phpunit --colors=never
|
|
artifacts:
|
|
expire_in: 30 min
|
|
paths:
|
|
- bin
|
|
- tests/app/vendor/
|