chill-bundles/.gitlab-ci.yml
Julien Fastré 3e0731f06e
Create an symfony app's skeleton to ease the development
[WIP] first import of automated recipes

[WIP] fix configuration file to be able to compile kernel and serve route

[WIP] first build of assets

[WIP] Continue working on configuration to load a page

[WIP] Reset the bin directory

[WIP] remove default migrations files

[WIP] fix configuration for running tests

[WIP] Installation instructions

Fix the default firewall in test login

[WIP] fix cs

[WIP] update gitlab-ci

[WIP] update gitlab-ci

[WIP] update gitlab ci

[WIP] fix config for running tests

[WIP] fix gitlab ci

[WIP] try tests/bootstrap php file from symfony bridge instead of phpunit recipe

remove kernel.php file

fix loading of entrypoint.json in test

[wip] increase memory limit for phpstan in test/ci

[WIP]: set the correct timezone directly within the phpunit.xml.dist file

[WIP]: fix security configuration

WIP: fix config for testing
2024-11-22 09:45:05 +01:00

134 lines
3.8 KiB
YAML

---
# Select what we should cache between builds
cache:
paths:
- /vendor/
- .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:17-3.5-alpine
alias: db
command:
- postgres
- "-c"
- max_connections=1000
- name: redis
alias: redis
# Set any variables we need
variables:
APP_ENV: test
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=17&charset=utf8
# fetch the chill-app using git submodules
# GIT_SUBMODULE_STRATEGY: recursive
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_URL: redis://redis:6379
DEFAULT_CARRIER_CODE: BE
# force a timezone
TZ: Europe/Brussels
# avoid direct deprecations (using symfony phpunit bridge: https://symfony.com/doc/4.x/components/phpunit_bridge.html#internal-deprecations
SYMFONY_DEPRECATIONS_HELPER: max[total]=99999999&max[self]=0&max[direct]=45&verbose=0
stages:
- Composer install
- Tests
- Deploy
build:
stage: Composer install
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
before_script:
- composer config -g cache-dir "$(pwd)/.cache"
script:
- composer install --optimize-autoloader --no-ansi --no-interaction --no-progress
cache:
paths:
- .cache/
artifacts:
expire_in: 1 day
paths:
- 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
cache:
paths:
- .cache/
artifacts:
expire_in: 1 day
paths:
- vendor/
phpstan_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
variables:
COMPOSER_MEMORY_LIMIT: 3G
before_script:
- bin/console cache:clear --env=dev
script:
- composer exec phpstan -- analyze --memory-limit=3G
cache:
paths:
- .cache/
artifacts:
expire_in: 1 day
paths:
- vendor/
rector_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
before_script:
- bin/console cache:clear --env=dev
script:
- composer exec rector -- process --dry-run
cache:
paths:
- .cache/
artifacts:
expire_in: 1 day
paths:
- vendor/
unit_tests:
stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82
variables:
COMPOSER_MEMORY_LIMIT: 3G
before_script:
- php bin/console doctrine:database:create -n --env=test
- php bin/console doctrine:migrations:migrate -n --env=test
- php bin/console chill:db:sync-views --env=test
- php bin/console cache:clear --env=test
- php bin/console doctrine:fixtures:load -n --env=test
script:
- composer exec phpunit -- --colors=never --exclude-group dbIntensive,openstack-integration
artifacts:
expire_in: 1 day
paths:
- vendor/
release:
stage: Deploy
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "running release_job"
release:
tag_name: '$CI_COMMIT_TAG'
description: "./.changes/$CI_COMMIT_TAG.md"