@@ -62,23 +62,22 @@ jobs:
6262 needs : access_check
6363 strategy :
6464 matrix :
65+ db : [ 'mysql', 'sqlite' ]
6566 payload :
66- - { laravel: '11.*', php: '8.3', 'testbench': '9.*' }
67- - { laravel: '11.*', php: '8.2', 'testbench': '9.*' }
68- - { laravel: '10.*', php: '8.3', 'testbench': '8.*' }
69- - { laravel: '10.*', php: '8.2', 'testbench': '8.*' }
70- - { laravel: '10.*', php: '8.1', 'testbench': '8.*' }
67+ - { laravel: '11.*', php: '8.3', 'testbench': '9.*', collision: '8.*' }
68+ - { laravel: '11.*', php: '8.2', 'testbench': '9.*', collision: '8.*' }
69+ - { laravel: '10.*', php: '8.3', 'testbench': '8.*', collision: '7.*' }
70+ - { laravel: '10.*', php: '8.2', 'testbench': '8.*', collision: '7.*' }
71+ - { laravel: '10.*', php: '8.1', 'testbench': '8.*', collision: '7.*' }
7172
72- name : PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }}
73+ name : PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }} - DB ${{ matrix.db }}
7374
7475 services :
7576 mysql :
7677 image : mysql:8
7778 env :
78- MYSQL_USER : root
79- MYSQL_ROOT_PASSWORD : root
80- MYSQL_PASSWORD :
81- MYSQL_ALLOW_EMPTY_PASSWORD : true
79+ MYSQL_USER : test
80+ MYSQL_PASSWORD : test
8281 MYSQL_DATABASE : test
8382 ports :
8483 - 3307:3306
9796 extensions : mbstring, dom, fileinfo, mysql
9897 coverage : none
9998
99+ - name : Set up MySQL and PostgreSQL
100+ run : |
101+ MYSQL_PORT=3307 POSTGRES_PORT=5432 docker compose up ${{ matrix.db }} -d
102+
100103 - name : Install dependencies
101104 run : |
102- composer require "laravel/framework:${{ matrix.payload.laravel }}" "orchestra/testbench:${{ matrix.payload.testbench }}" --no-interaction --no-update
105+ composer require "laravel/framework:${{ matrix.payload.laravel }}" "orchestra/testbench:${{ matrix.payload.testbench }}" "nunomaduro/collision:${{ matrix.payload.collision }}" --no-interaction --no-update
103106 composer update --prefer-stable --prefer-dist --no-interaction
107+ if [ "${{ matrix.db }}" = "mysql" ]; then
108+ while ! mysqladmin ping --host=127.0.0.1 --user=test --port=3307 --password=test --silent; do
109+ echo "Waiting for MySQL..."
110+ sleep 1
111+ done
112+ else
113+ echo "Not waiting for MySQL."
114+ fi
104115 - name : Execute tests
116+ env :
117+ DB_DRIVER : ${{ matrix.db }}
105118 run : composer test
0 commit comments