Add missing templates, add PostgreSQL and Redis services to CI
- Create 13 missing Twig templates (account, security, legal, unsubscribe, pages) - CI: add PostgreSQL and Redis service containers for php and sonarqube jobs - CI: create database schema before running tests - Use null mailer in test environment Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,30 @@ on:
|
||||
jobs:
|
||||
php:
|
||||
runs_on: ubuntu-latest
|
||||
services:
|
||||
database:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_USER: app
|
||||
POSTGRES_PASSWORD: secret
|
||||
POSTGRES_DB: e_ticket_test
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U app -d e_ticket_test"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
DATABASE_URL: "postgresql://app:secret@database:5432/e_ticket_test?serverVersion=16&charset=utf8"
|
||||
MESSENGER_TRANSPORT_DSN: "redis://redis:6379/messages"
|
||||
MAILER_DSN: "null://null"
|
||||
APP_ENV: test
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -42,6 +66,9 @@ jobs:
|
||||
- name: PHP CS Fixer
|
||||
run: vendor/bin/php-cs-fixer fix --dry-run --diff
|
||||
|
||||
- name: Create database schema
|
||||
run: php bin/console doctrine:schema:create --env=test
|
||||
|
||||
- name: PHPUnit with coverage
|
||||
run: vendor/bin/phpunit --testdox --coverage-clover coverage.xml --coverage-text
|
||||
|
||||
@@ -74,6 +101,30 @@ jobs:
|
||||
sonarqube:
|
||||
needs: [php, frontend]
|
||||
runs_on: ubuntu-latest
|
||||
services:
|
||||
database:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_USER: app
|
||||
POSTGRES_PASSWORD: secret
|
||||
POSTGRES_DB: e_ticket_test
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U app -d e_ticket_test"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
env:
|
||||
DATABASE_URL: "postgresql://app:secret@database:5432/e_ticket_test?serverVersion=16&charset=utf8"
|
||||
MESSENGER_TRANSPORT_DSN: "redis://redis:6379/messages"
|
||||
MAILER_DSN: "null://null"
|
||||
APP_ENV: test
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -90,6 +141,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
|
||||
- name: Create database schema
|
||||
run: php bin/console doctrine:schema:create --env=test
|
||||
|
||||
- name: Generate coverage
|
||||
run: vendor/bin/phpunit --coverage-clover coverage.xml
|
||||
|
||||
|
||||
Reference in New Issue
Block a user