File tree Expand file tree Collapse file tree 1 file changed +40
-3
lines changed
Expand file tree Collapse file tree 1 file changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,41 @@ jobs:
1313 tests :
1414 runs-on : ubuntu-latest
1515
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+
1643 strategy :
1744 fail-fast : false
1845 matrix :
19- php-version : ['8.1 ', '8.2 ', '8.3 ']
46+ php-version : ['8.2 ', '8.3 ', '8.4 ']
2047 symfony-version : ['6.4', '7.0']
48+ database : ['mysql', 'postgres']
2149
22- name : PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }}
50+ name : PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }} - ${{ matrix.database }}
2351
2452 steps :
2553 - uses : actions/checkout@v4
4775 - name : Run PHPStan
4876 run : composer phpstan
4977
50- - name : Run PHPUnit tests
78+ - name : Run PHPUnit tests (PostgreSQL)
79+ if : matrix.database == 'postgres'
80+ env :
81+ DATABASE_URL : postgresql://postgres:postgres@127.0.0.1:5432/test_db?serverVersion=15&charset=utf8
82+ run : composer test
83+
84+ - name : Run PHPUnit tests (MySQL)
85+ if : matrix.database == 'mysql'
86+ env :
87+ DATABASE_URL : mysql://root:root@127.0.0.1:3306/test_db?serverVersion=8.0
5188 run : composer test
You can’t perform that action at this time.
0 commit comments