@@ -2,7 +2,7 @@ name: Run tests
2
2
3
3
on :
4
4
pull_request_target :
5
- types : [opened, synchronize, labeled]
5
+ types : [ opened, synchronize, labeled ]
6
6
schedule :
7
7
- cron : ' 0 0 * * *'
8
8
@@ -62,17 +62,22 @@ jobs:
62
62
needs : access_check
63
63
strategy :
64
64
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' }
66
72
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.*'}
71
73
- { queue: 'github-actions-laravel11-php82', laravel: '11.*', php: '8.2', 'testbench': '9.*' }
72
74
- { queue: 'github-actions-laravel11-php83', laravel: '11.*', php: '8.3', 'testbench': '9.*' }
73
75
- { 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.*' }
74
79
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 }}
76
81
77
82
steps :
78
83
- name : Checkout code
@@ -92,12 +97,16 @@ jobs:
92
97
CI_SERVICE_ACCOUNT_JSON_KEY : ${{ secrets.CI_SERVICE_ACCOUNT_JSON_KEY }}
93
98
run : |
94
99
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
96
105
- name : Install dependencies
97
106
run : |
98
107
composer require "laravel/framework:${{ matrix.payload.laravel }}" "orchestra/testbench:${{ matrix.payload.testbench }}" --no-interaction --no-update
99
108
composer update --prefer-stable --prefer-dist --no-interaction
100
- if [ "${{ matrix.db }}" = "mysql" ]; then
109
+ if [ "${{ matrix.db.driver }}" = "mysql" ]; then
101
110
while ! mysqladmin ping --host=127.0.0.1 --user=cloudtasks --port=3307 --password=cloudtasks --silent; do
102
111
echo "Waiting for MySQL..."
103
112
sleep 1
@@ -107,7 +116,7 @@ jobs:
107
116
fi
108
117
- name : Execute tests
109
118
env :
110
- DB_DRIVER : ${{ matrix.db }}
119
+ DB_DRIVER : ${{ matrix.db.driver }}
111
120
DB_HOST : 127.0.0.1
112
121
CI_CLOUD_TASKS_PROJECT_ID : ${{ secrets.CI_CLOUD_TASKS_PROJECT_ID }}
113
122
CI_CLOUD_TASKS_QUEUE : ${{ secrets.CI_CLOUD_TASKS_QUEUE }}
0 commit comments