83
83
- php : ' latest'
84
84
type : ' Phpunit Burn'
85
85
env :
86
- LOG_COVERAGE : 1 # "${{ fromJSON('{true: \"1\", false: \"\"}')[matrix.php == '8.0' && matrix.type == 'Phpunit' && (github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')))] }}"
86
+ LOG_COVERAGE : " ${{ fromJSON('{true: \" 1\" , false: \"\" }')[matrix.php == '8.0' && matrix.type == 'Phpunit' && (github.event_name == 'pull_request' || (github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')))] }}"
87
87
services :
88
88
mysql :
89
89
image : mysql:8
@@ -160,14 +160,36 @@ jobs:
160
160
- name : " Run tests: MySQL (only for Phpunit)"
161
161
if : startsWith(matrix.type, 'Phpunit')
162
162
env :
163
- DB_DSN : " mysql:dbname=atk4_test; host=mysql"
163
+ DB_DSN : " mysql:dbname=host=mysql;atk4_test "
164
164
DB_USER : atk4_test
165
165
DB_PASSWD : atk4_pass
166
166
run : |
167
167
php demos/_demo-data/create-db.php
168
168
vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
169
169
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mysql.cov; fi
170
170
171
+ - name : " Run tests: MariaDB (only for Phpunit)"
172
+ if : startsWith(matrix.type, 'Phpunit')
173
+ env :
174
+ DB_DSN : " mysql:host=mariadb;dbname=atk4_test"
175
+ DB_USER : atk4_test
176
+ DB_PASSWD : atk4_pass
177
+ run : |
178
+ php demos/_demo-data/create-db.php
179
+ vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
180
+ if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mariadb.cov; fi
181
+
182
+ - name : " Run tests: PostgreSQL (only for Phpunit)"
183
+ if : startsWith(matrix.type, 'Phpunit')
184
+ env :
185
+ DB_DSN : " pgsql:host=postgres;dbname=atk4_test"
186
+ DB_USER : atk4_test
187
+ DB_PASSWD : atk4_pass
188
+ run : |
189
+ php demos/_demo-data/create-db.php
190
+ vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
191
+ if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-postgres.cov; fi
192
+
171
193
- name : " Run tests: MSSQL (only for Phpunit)"
172
194
if : startsWith(matrix.type, 'Phpunit')
173
195
env :
@@ -179,6 +201,17 @@ jobs:
179
201
vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
180
202
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-mssql.cov; fi
181
203
204
+ - name : " Run tests: Oracle (only for Phpunit)"
205
+ if : startsWith(matrix.type, 'Phpunit')
206
+ env :
207
+ DB_DSN : " oci:dbname=oracle/xe;charset=UTF8"
208
+ DB_USER : system
209
+ DB_PASSWD : oracle
210
+ run : |
211
+ php demos/_demo-data/create-db.php
212
+ vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
213
+ if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-oracle.cov; fi
214
+
182
215
- name : Upload coverage logs 1/2 (only for latest Phpunit)
183
216
if : env.LOG_COVERAGE
184
217
run : |
0 commit comments