8
8
9
9
jobs :
10
10
tests :
11
- name : P:${{ matrix.php }}, S:${{ matrix.symfony }}, D:${{ matrix.database }}, PU:${{ matrix.phpunit }}${{ matrix.deps == 'lowest' && ' (lowest)' || '' }}${{ matrix.without-dama == 0 && contains(matrix.database, 'sql') && ' (dama)' || '' }}${{ matrix. use-phpunit-extension == 1 && ' (phpunit extension)' || '' }}
11
+ name : P:${{ matrix.php }}, S:${{ matrix.symfony }}, D:${{ matrix.database }}, PU:${{ matrix.phpunit }}${{ matrix.deps == 'lowest' && ' (lowest)' || '' }}${{ matrix.use-phpunit-extension == 1 && ' (phpunit extension)' || '' }}
12
12
runs-on : ubuntu-latest
13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
16
- php : [ 8.1, 8. 2, 8.3, 8.4 ]
16
+ php : [ 8.2, 8.3, 8.4 ]
17
17
symfony : [ 6.4.*, 7.1.*, 7.2.* ]
18
- database : [ mysql, mongo ]
19
- phpunit : [ 9, 11 ]
18
+ database : [ mysql| mongo ]
19
+ phpunit : [ 11 ]
20
20
21
21
# default values:
22
22
# deps: [ highest ]
23
- # without-dama: [ 0 ]
24
23
# use-phpunit-extension: [ 0 ]
25
24
26
25
exclude :
27
26
- {php: 8.1, symfony: 7.1.*}
28
27
- {php: 8.1, symfony: 7.2.*}
29
- - {php: 8.1, phpunit: 11 }
30
28
include :
29
+ # php 8.1
30
+ - {php: 8.1, symfony: 6.4.*, phpunit: 9, database: mysql}
31
+
32
+ # old PHPUnit versions
33
+ - {php: 8.3, symfony: '*', phpunit: 9, database: mysql}
34
+ - {php: 8.3, symfony: '*', phpunit: 10, database: mysql}
35
+
36
+ # test with no database (PHPUnit 9 is used to prevent some problems with empty data providers)
31
37
- {php: 8.3, symfony: '*', phpunit: 9, database: none}
32
- - {php: 8.3, symfony: '*', phpunit: 11, database: mysql|mongo}
33
- - {php: 8.3, symfony: '*', phpunit: 11, database: pgsql|mongo}
34
- - {php: 8.3, symfony: '*', phpunit: 11, database: pgsql, without-dama: 1}
35
- - {php: 8.3, symfony: '*', phpunit: 11, database: sqlite, without-dama: 1}
36
- - {php: 8.3, symfony: '*', phpunit: 9, database: sqlite, without-dama: 1, deps: lowest}
38
+ - {php: 8.3, symfony: '*', phpunit: 9, database: none, deps: lowest}
39
+
40
+ # One permutation per DBMS
41
+ - {php: 8.3, symfony: '*', phpunit: 11, database: mongo}
42
+ - {php: 8.3, symfony: '*', phpunit: 11, database: pgsql}
43
+ - {php: 8.3, symfony: '*', phpunit: 11, database: sqlite}
44
+ - {php: 8.3, symfony: '*', phpunit: 11, database: mysql}
45
+
46
+ # lowest deps (one per DBMS)
47
+ - {php: 8.3, symfony: '*', phpunit: 9, database: mysql|mongo, deps: lowest}
48
+ - {php: 8.3, symfony: '*', phpunit: 9, database: mongo, deps: lowest}
49
+ - {php: 8.3, symfony: '*', phpunit: 9, database: pgsql, deps: lowest}
50
+ - {php: 8.3, symfony: '*', phpunit: 9, database: sqlite, deps: lowest}
37
51
- {php: 8.3, symfony: '*', phpunit: 9, database: mysql, deps: lowest}
38
- - {php: 8.3, symfony: '*', phpunit: 10, database: mysql|mongo}
52
+
53
+ # using Foundry's PHPUnit extension
39
54
- {php: 8.3, symfony: '*', phpunit: 11, database: mysql|mongo, use-phpunit-extension: 1}
40
- - {php: 8.3, symfony: '*', phpunit: 11, database: mysql|mongo, use-phpunit-extension: 1, without-dama: 1}
41
55
env :
42
56
DATABASE_URL : ${{ contains(matrix.database, 'mysql') && 'mysql://root:root@localhost:3306/foundry?serverVersion=5.7.42' || contains(matrix.database, 'pgsql') && 'postgresql://root:root@localhost:5432/foundry?serverVersion=15' || contains(matrix.database, 'sqlite') && 'sqlite:///%kernel.project_dir%/var/data.db' || '' }}
43
57
MONGO_URL : ${{ contains(matrix.database, 'mongo') && 'mongodb://127.0.0.1:27017/dbName?compressors=disabled&gssapiServiceName=mongodb' || '' }}
44
- USE_DAMA_DOCTRINE_TEST_BUNDLE : ${{ matrix.without-dama == 0 && contains(matrix.database, 'sql') && 1 || 0 }}
58
+ USE_DAMA_DOCTRINE_TEST_BUNDLE : ${{ contains(matrix.database, 'sql') && 1 || 0 }}
45
59
USE_FOUNDRY_PHPUNIT_EXTENSION : ${{ matrix.use-phpunit-extension || 0 }}
46
60
PHPUNIT_VERSION : ${{ matrix.phpunit }}
47
61
services :
@@ -90,25 +104,20 @@ jobs:
90
104
shell : bash
91
105
92
106
test-reset-database :
93
- name : Test reset database - D:${{ matrix.database }} ${{ matrix.use-dama == 1 && ' (dama)' || '' }} ${{ matrix.reset-database-mode == 'migrate' && ' (migrate)' || '' }} ${{ contains(matrix.with-migration-configuration-file, 'transactional') && '(configuration file transactional)' || contains(matrix.with-migration-configuration-file, 'configuration') && '(configuration file)' || '' }}
107
+ name : Reset DB - D:${{ matrix.database }} ${{ matrix.use-dama == 1 && ' (dama)' || '' }} ${{ matrix.reset-database-mode == 'migrate' && ' (migrate)' || '' }} ${{ contains(matrix.with-migration-configuration-file, 'transactional') && '(configuration file transactional)' || contains(matrix.with-migration-configuration-file, 'configuration') && '(configuration file)' || '' }}${{ matrix.deps == 'lowest' && ' (lowest )' || '' }}
94
108
runs-on : ubuntu-latest
95
109
strategy :
96
110
fail-fast : false
97
111
matrix :
98
112
database : [ mysql, pgsql, sqlite, mysql|mongo ]
99
113
use-dama : [ 0, 1 ]
100
114
reset-database-mode : [ schema, migrate ]
101
- migration-configuration-file : ['no', 'migration-configuration', 'migration-configuration-transactional']
115
+ migration-configuration-file : ['no']
116
+ deps : [ highest, lowest ]
102
117
include :
103
118
- { database: mongo, migration-configuration-file: 'no', use-dama: 0, reset-database-mode: schema }
104
- exclude :
105
- # there is currently a bug with MySQL and transactional migrations
106
- - database : mysql
107
- migration-configuration-file : ' migration-configuration-transactional'
108
- - reset-database-mode : schema
109
- migration-configuration-file : ' migration-configuration'
110
- - reset-database-mode : schema
111
- migration-configuration-file : ' migration-configuration-transactional'
119
+ - { database: pgsql, migration-configuration-file: 'migration-configuration', use-dama: 0, reset-database-mode: migration }
120
+ - { database: pgsql, migration-configuration-file: 'migration-configuration-transactional', use-dama: 0, reset-database-mode: migration }
112
121
env :
113
122
DATABASE_URL : ${{ contains(matrix.database, 'mysql') && 'mysql://root:root@localhost:3306/foundry?serverVersion=5.7.42' || contains(matrix.database, 'pgsql') && 'postgresql://root:root@localhost:5432/foundry?serverVersion=15' || 'sqlite:///%kernel.project_dir%/var/data.db' }}
114
123
MONGO_URL : ${{ contains(matrix.database, 'mongo') && 'mongodb://127.0.0.1:27017/dbName?compressors=disabled&gssapiServiceName=mongodb' || '' }}
@@ -148,7 +157,7 @@ jobs:
148
157
- name : Install dependencies
149
158
uses : ramsey/composer-install@v2
150
159
with :
151
- dependency-versions : highest
160
+ dependency-versions : ${{ matrix.deps }}
152
161
composer-options : --prefer-dist
153
162
env :
154
163
SYMFONY_REQUIRE : 7.1.*
@@ -158,7 +167,12 @@ jobs:
158
167
run : sudo /etc/init.d/mysql start
159
168
160
169
- name : Test
161
- run : ./phpunit --testsuite reset-database --bootstrap tests/bootstrap-reset-database.php
170
+ run : |
171
+ ./phpunit --testsuite reset-database --bootstrap tests/bootstrap-reset-database.php
172
+
173
+ # We should be able to run the tests twice in order to check if the second run also starts from a fresh db
174
+ # some bugs could be detected this way
175
+ ./phpunit --testsuite reset-database --bootstrap tests/bootstrap-reset-database.php
162
176
shell : bash
163
177
164
178
test-with-paratest :
0 commit comments