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