@@ -2,7 +2,7 @@ name: Run tests
22
33on :
44 pull_request_target :
5- types : [opened, synchronize, labeled]
5+ types : [ opened, synchronize, labeled ]
66 schedule :
77 - cron : ' 0 0 * * *'
88
@@ -62,17 +62,22 @@ jobs:
6262 needs : access_check
6363 strategy :
6464 matrix :
65- db : ['mysql', 'pgsql']
65+ db :
66+ - { driver: 'mysql', version: '8.0' }
67+ - { driver: 'mysql', version: '8.4' }
68+ - { driver: 'pgsql', version: '14' }
69+ - { driver: 'pgsql', version: '15' }
70+ - { driver: 'pgsql', version: '16' }
71+ - { driver: 'pgsql', version: '17' }
6672 payload :
67- - { queue: 'github-actions-laravel10-php84', laravel: '10.*', php: '8.4', 'testbench': '8.*'}
68- - { queue: 'github-actions-laravel10-php83', laravel: '10.*', php: '8.3', 'testbench': '8.*'}
69- - { queue: 'github-actions-laravel10-php82', laravel: '10.*', php: '8.2', 'testbench': '8.*'}
70- - { queue: 'github-actions-laravel10-php81', laravel: '10.*', php: '8.1', 'testbench': '8.*'}
7173 - { queue: 'github-actions-laravel11-php82', laravel: '11.*', php: '8.2', 'testbench': '9.*' }
7274 - { queue: 'github-actions-laravel11-php83', laravel: '11.*', php: '8.3', 'testbench': '9.*' }
7375 - { queue: 'github-actions-laravel11-php84', laravel: '11.*', php: '8.4', 'testbench': '9.*' }
76+ - { queue: 'github-actions-laravel12-php82', laravel: '12.*', php: '8.2', 'testbench': '10.*' }
77+ - { queue: 'github-actions-laravel12-php83', laravel: '12.*', php: '8.3', 'testbench': '10.*' }
78+ - { queue: 'github-actions-laravel12-php84', laravel: '12.*', php: '8.4', 'testbench': '10.*' }
7479
75- name : PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }} - DB ${{ matrix.db }}
80+ name : PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }} - DB ${{ matrix.db.driver }} ${{ matrix.db.version }}
7681
7782 steps :
7883 - name : Checkout code
@@ -92,12 +97,16 @@ jobs:
9297 CI_SERVICE_ACCOUNT_JSON_KEY : ${{ secrets.CI_SERVICE_ACCOUNT_JSON_KEY }}
9398 run : |
9499 touch .env
95- MYSQL_PORT=3307 POSTGRES_PORT=5432 docker compose up ${{ matrix.db }} -d
100+ if [ "${{ matrix.db.driver }}" = "mysql" ]; then
101+ MYSQL_PORT=3307 MYSQL_VERSION=${{ matrix.db.version }} docker compose up ${{ matrix.db.driver }} -d
102+ elif [ "${{ matrix.db.driver }}" = "pgsql" ]; then
103+ POSTGRES_PORT=5432 PGSQL_VERSION=${{ matrix.db.version }} docker compose up ${{ matrix.db.driver }} -d
104+ fi
96105 - name : Install dependencies
97106 run : |
98107 composer require "laravel/framework:${{ matrix.payload.laravel }}" "orchestra/testbench:${{ matrix.payload.testbench }}" --no-interaction --no-update
99108 composer update --prefer-stable --prefer-dist --no-interaction
100- if [ "${{ matrix.db }}" = "mysql" ]; then
109+ if [ "${{ matrix.db.driver }}" = "mysql" ]; then
101110 while ! mysqladmin ping --host=127.0.0.1 --user=cloudtasks --port=3307 --password=cloudtasks --silent; do
102111 echo "Waiting for MySQL..."
103112 sleep 1
@@ -107,7 +116,7 @@ jobs:
107116 fi
108117 - name : Execute tests
109118 env :
110- DB_DRIVER : ${{ matrix.db }}
119+ DB_DRIVER : ${{ matrix.db.driver }}
111120 DB_HOST : 127.0.0.1
112121 CI_CLOUD_TASKS_PROJECT_ID : ${{ secrets.CI_CLOUD_TASKS_PROJECT_ID }}
113122 CI_CLOUD_TASKS_QUEUE : ${{ secrets.CI_CLOUD_TASKS_QUEUE }}
0 commit comments