32
32
test :
33
33
name : ${{ matrix.name }}
34
34
runs-on : ${{ matrix.os }}
35
- timeout-minutes : 8
35
+ timeout-minutes : 15
36
36
continue-on-error : ${{ matrix.allow-failure == 1 }}
37
37
38
38
strategy :
@@ -60,19 +60,22 @@ jobs:
60
60
symfony : ' 5.4.*@dev'
61
61
allow-unstable : true
62
62
mongodb : true
63
+ mysql : true
63
64
64
65
- name : ' Test Symfony 5.4 [Windows, PHP 8.1]'
65
66
os : ' windows-latest'
66
67
php : ' 8.1'
67
68
symfony : ' 5.4.*@dev'
68
69
mongodb : true
70
+ mysql : true
69
71
allow-unstable : true
70
72
71
73
- name : ' Test Symfony 6.0 [Linux, PHP 8.1]'
72
74
os : ' ubuntu-latest'
73
75
php : ' 8.1'
74
76
symfony : ' 6.0.*@dev'
75
77
mongodb : true
78
+ mysql : true
76
79
allow-unstable : true
77
80
78
81
# Bleeding edge (unreleased dev versions where failures are allowed)
83
86
composer-flags : ' --ignore-platform-req php'
84
87
allow-unstable : true
85
88
allow-failure : true
89
+ mysql : true
86
90
mongodb : true
87
91
88
92
steps :
98
102
uses : shivammathur/setup-php@v2
99
103
with :
100
104
php-version : ${{ matrix.php }}
101
- extensions : pdo_sqlite ${{ matrix.mongodb && ', mongodb' }}
105
+ extensions : pdo_sqlite ${{ matrix.mongodb && ', mongodb' }} ${{ matrix.mysql && ', pdo_mysql' }}
102
106
coverage : pcov
103
107
tools : ' composer:v2,flex'
104
108
@@ -112,6 +116,17 @@ jobs:
112
116
args : install mongodb
113
117
if : ${{ matrix.mongodb && matrix.os == 'windows-latest' }}
114
118
119
+ - name : ' Shutdown Default Ubuntu MySQL'
120
+ run : sudo service mysql stop
121
+ if : ${{ matrix.mysql && matrix.os == 'ubuntu-latest' }}
122
+
123
+ - name : ' Setup MySQL'
124
+ uses : ankane/setup-mysql@v1
125
+ with :
126
+ mysql-version : ' 8.0'
127
+ database : doctrine_tests
128
+ if : ${{ matrix.mysql }}
129
+
115
130
- name : ' Get composer cache directory'
116
131
id : composer-cache
117
132
run : echo "::set-output name=dir::$(composer config cache-files-dir)"
@@ -132,9 +147,24 @@ jobs:
132
147
if : ${{ matrix.mongodb }}
133
148
134
149
- name : ' Install dependencies'
135
- run : composer update --prefer-dist ${{ matrix.composer-flags }} --ansi
150
+ run : |
151
+ echo "::group::Install project deps"
152
+ composer update --prefer-dist ${{ matrix.composer-flags }} --ansi
153
+ echo "::endgroup::"
154
+
155
+ echo "::group::Install PHPUnit"
156
+ vendor/bin/simple-phpunit install
157
+ echo "::endgroup::"
136
158
env :
137
159
SYMFONY_REQUIRE : " ${{ matrix.symfony }}"
138
160
161
+ - name : ' Set Doctrine MySQL DSN (Linux)'
162
+ run : echo "DOCTRINE_DBAL_URL=pdo-mysql://root@127.0.0.1:3306/doctrine_tests?serverVersion=8.0" >> $GITHUB_ENV
163
+ if : ${{ matrix.mysql && matrix.os == 'ubuntu-latest' }}
164
+
165
+ - name : ' Set Doctrine MySQL DSN (Windows)'
166
+ run : echo "DOCTRINE_DBAL_URL=pdo-mysql://root@127.0.0.1:3306/doctrine_tests?serverVersion=8.0" >> $env:GITHUB_ENV
167
+ if : ${{ matrix.mysql && matrix.os == 'windows-latest' }}
168
+
139
169
- name : ' Run PHPUnit tests'
140
170
run : vendor/bin/simple-phpunit --testdox --verbose ${{ matrix.code-coverage && '--coverage-text --coverage-clover build/logs/clover.xml' }}
0 commit comments