Add CI pipeline, Meilisearch service, CacheService and code quality tools
- CI: lint, PHPStan, PHP CS Fixer, ESLint, Stylelint, security audit, build - MeilisearchService: async via Messenger, sync search - MeilisearchMessage + handler for async operations - CacheService with CacheKey enum (TTL per key, remember pattern) - Meilisearch env vars in .env.local, vault and env.local.j2 - Messenger routing for MeilisearchMessage - PHPStan level 6, ESLint, Stylelint configs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
104
.gitea/workflows/ci.yml
Normal file
104
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,104 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs_on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.4'
|
||||
extensions: intl, pdo_pgsql, zip, gd, redis, imagick
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
|
||||
- name: Lint Twig
|
||||
run: php bin/console lint:twig templates/
|
||||
|
||||
- name: Lint YAML
|
||||
run: php bin/console lint:yaml config/
|
||||
|
||||
- name: Lint Container
|
||||
run: php bin/console lint:container
|
||||
|
||||
quality-php:
|
||||
runs_on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.4'
|
||||
extensions: intl, pdo_pgsql, zip, gd, redis, imagick
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
|
||||
- name: PHPStan
|
||||
run: vendor/bin/phpstan analyse src/ --level=6 --no-progress
|
||||
|
||||
- name: PHP CS Fixer
|
||||
run: vendor/bin/php-cs-fixer fix --dry-run --diff
|
||||
|
||||
quality-frontend:
|
||||
runs_on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: bun install
|
||||
|
||||
- name: ESLint
|
||||
run: bunx eslint assets/ --ext .js,.ts
|
||||
|
||||
- name: Stylelint
|
||||
run: bunx stylelint "assets/**/*.scss"
|
||||
|
||||
security:
|
||||
runs_on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.4'
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
|
||||
- name: Security audit
|
||||
run: composer audit
|
||||
|
||||
build:
|
||||
runs_on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install JS dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build assets
|
||||
run: bun run build
|
||||
Reference in New Issue
Block a user