@@ -168,6 +168,67 @@ jobs:
168168 POSTGRES_PASSWORD : joomla_ut
169169 POSTGRES_DB : test_joomla
170170
171+ tests-unit-windows :
172+ name : Run Unit tests (Windows)
173+ runs-on : windows-latest
174+ needs : [code-style-php]
175+ strategy :
176+ matrix :
177+ php_version : ['8.1', '8.2', '8.3', '8.4']
178+ steps :
179+ - uses : actions/checkout@v4
180+ - uses : actions/cache/restore@v4
181+ id : cache-php-windows
182+ with :
183+ path : libraries/vendor
184+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
185+ - name : Setup PHP
186+ uses : shivammathur/setup-php@v2
187+ with :
188+ php-version : ${{ matrix.php_version }}
189+ extensions : openssl, mbstring, fileinfo, gd, gmp, pgsql, mysql, mysqli, curl, opcache, ldap
190+ ini-values : post_max_size=256M, date.timezone="UTC"
191+ - name : Install Composer dependencies
192+ if : steps.cache-php-windows.outputs.cache-hit != 'true'
193+ run : composer install --no-progress --ignore-platform-reqs
194+ - name : Run Unit tests
195+ run : php libraries/vendor/bin/phpunit --testsuite Unit
196+
197+ tests-integration-windows :
198+ name : Run integration tests (Windows)
199+ runs-on : windows-latest
200+ needs : [code-style-php]
201+ strategy :
202+ matrix :
203+ php_version : ['8.1', '8.2', '8.3', '8.4']
204+ steps :
205+ - uses : actions/checkout@v4
206+ - uses : actions/cache/restore@v4
207+ with :
208+ path : libraries/vendor
209+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
210+ - uses : shogo82148/actions-setup-mysql@v1
211+ with :
212+ mysql-version : " mariadb-10.4"
213+ root-password : " joomla_ut"
214+ user : " joomla_ut"
215+ password : " joomla_ut"
216+ - name : Setup PHP
217+ uses : shivammathur/setup-php@v2
218+ with :
219+ php-version : ${{ matrix.php_version }}
220+ extensions : openssl, mbstring, fileinfo, gd, gmp, pgsql, mysql, mysqli, curl, opcache, ldap
221+ ini-values : post_max_size=256M, date.timezone="UTC"
222+ - name : Install Composer dependencies
223+ if : steps.cache-php-windows.outputs.cache-hit != 'true'
224+ run : |
225+ composer install --no-progress --ignore-platform-reqs
226+ mysql -uroot -pjoomla_ut -e 'CREATE DATABASE IF NOT EXISTS test_joomla;'
227+ - name : Run Integration tests
228+ run : |
229+ sleep 3
230+ php libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-windows.xml.dist
231+
171232 tests-system-prepare :
172233 name : Prepare system tests
173234 runs-on : ubuntu-latest
0 commit comments