Skip to content

Commit 63ecbc8

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 4ea4146 + 8277432 commit 63ecbc8

File tree

2 files changed

+90
-1
lines changed

2 files changed

+90
-1
lines changed

.github/workflows/symfony.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Symfony
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
16+
services:
17+
postgres:
18+
image: postgres:15
19+
env:
20+
POSTGRES_PASSWORD: postgres
21+
POSTGRES_DB: test_db
22+
options: >-
23+
--health-cmd pg_isready
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 5
27+
ports:
28+
- 5432:5432
29+
30+
mysql:
31+
image: mysql:8.0
32+
env:
33+
MYSQL_ROOT_PASSWORD: root
34+
MYSQL_DATABASE: test_db
35+
options: >-
36+
--health-cmd="mysqladmin ping"
37+
--health-interval=10s
38+
--health-timeout=5s
39+
--health-retries=3
40+
ports:
41+
- 3306:3306
42+
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
php-version: ['8.2', '8.3', '8.4']
47+
symfony-version: ['6.4', '7.0']
48+
database: ['mysql', 'postgres']
49+
50+
name: PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }} - ${{ matrix.database }}
51+
52+
steps:
53+
- uses: actions/checkout@v4
54+
55+
- name: Setup PHP
56+
uses: shivammathur/setup-php@v2
57+
with:
58+
php-version: ${{ matrix.php-version }}
59+
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, pdo_pgsql
60+
coverage: none
61+
62+
- name: Cache Composer packages
63+
uses: actions/cache@v3
64+
with:
65+
path: vendor
66+
key: ${{ runner.os }}-php-${{ matrix.php-version }}-symfony-${{ matrix.symfony-version }}-${{ hashFiles('**/composer.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-php-${{ matrix.php-version }}-symfony-${{ matrix.symfony-version }}-
69+
70+
- name: Install dependencies
71+
run: |
72+
composer require "symfony/framework-bundle:^${{ matrix.symfony-version }}" --no-update
73+
composer require "symfony/var-exporter:^${{ matrix.symfony-version }}" --no-update --dev
74+
composer install --prefer-dist --no-progress --no-interaction
75+
76+
- name: Run PHPStan
77+
run: composer phpstan
78+
79+
- name: Run PHPUnit tests (PostgreSQL)
80+
if: matrix.database == 'postgres'
81+
env:
82+
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/test_db?serverVersion=15&charset=utf8
83+
run: composer test
84+
85+
- name: Run PHPUnit tests (MySQL)
86+
if: matrix.database == 'mysql'
87+
env:
88+
DATABASE_URL: mysql://root:root@127.0.0.1:3306/test_db?serverVersion=8.0
89+
run: composer test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Latest Version](https://img.shields.io/packagist/v/rgalstyan/symfony-aggregated-queries.svg?style=flat-square)](https://packagist.org/packages/rgalstyan/symfony-aggregated-queries)
44
[![Total Downloads](https://img.shields.io/packagist/dt/rgalstyan/symfony-aggregated-queries.svg?style=flat-square)](https://packagist.org/packages/rgalstyan/symfony-aggregated-queries)
5-
[![Tests](https://img.shields.io/github/actions/workflow/status/rgalstyan/symfony-aggregated-queries/tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/rgalstyan/symfony-aggregated-queries/actions)
5+
[![Tests](https://img.shields.io/github/actions/workflow/status/rgalstyan/symfony-aggregated-queries/symfony.yml?branch=main&label=tests&style=flat-square)](https://github.com/rgalstyan/symfony-aggregated-queries/actions)
66
[![License](https://img.shields.io/packagist/l/rgalstyan/symfony-aggregated-queries.svg?style=flat-square)](https://packagist.org/packages/rgalstyan/symfony-aggregated-queries)
77

88
Reduce multi-relation Doctrine queries to a single optimized SQL statement using JSON aggregation.

0 commit comments

Comments
 (0)