Skip to content

Commit 4ebef16

Browse files
committed
Update tests workflow
1 parent a025b72 commit 4ebef16

1 file changed

Lines changed: 85 additions & 9 deletions

File tree

.github/workflows/tests.yml

Lines changed: 85 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313

1414
strategy:
1515
fail-fast: true
16-
matrix:
17-
php: ['8.1']
1816

1917
services:
2018
mariadb:
@@ -26,7 +24,7 @@ jobs:
2624
- 3306:3306
2725
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
2826

29-
name: PHP ${{ matrix.php }} - MariaDB
27+
name: PHP 8.1 - MariaDB
3028

3129
steps:
3230
- name: Checkout
@@ -35,7 +33,7 @@ jobs:
3533
- name: Setup PHP
3634
uses: shivammathur/setup-php@v2
3735
with:
38-
php-version: ${{ matrix.php }}
36+
php-version: 8.1
3937
ini-values: mysqli.allow_local_infile=On
4038
tools: composer
4139
coverage: xdebug
@@ -73,16 +71,53 @@ jobs:
7371
cp build/coverage/clover.xml build/logs/clover.xml
7472
composer global require php-coveralls/php-coveralls
7573
php-coveralls --coverage_clover=build/logs/clover.xml -v
76-
if: matrix.php == '8.1'
74+
75+
mariadb-last:
76+
runs-on: ubuntu-20.04
77+
timeout-minutes: 10
78+
79+
strategy:
80+
fail-fast: true
81+
82+
services:
83+
mariadb:
84+
image: mariadb
85+
env:
86+
MYSQL_DATABASE: framework-tests
87+
MYSQL_ROOT_PASSWORD: password
88+
ports:
89+
- 3306:3306
90+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
91+
92+
name: PHP 8.2 - MariaDB - Last
93+
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v2
97+
98+
- name: Setup PHP
99+
uses: shivammathur/setup-php@v2
100+
with:
101+
php-version: 8.2
102+
ini-values: mysqli.allow_local_infile=On
103+
tools: composer
104+
coverage: xdebug
105+
106+
- name: Install dependencies
107+
run:
108+
composer update
109+
110+
- name: PHPUnit
111+
env:
112+
DB_HOST: 127.0.0.1
113+
run: vendor/bin/phpunit --verbose
77114

78115
mysql:
79116
runs-on: ubuntu-20.04
80117
timeout-minutes: 10
81118

82119
strategy:
83120
fail-fast: true
84-
matrix:
85-
php: ['8.1']
86121

87122
services:
88123
mysql:
@@ -94,7 +129,48 @@ jobs:
94129
- 3306:3306
95130
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
96131

97-
name: PHP ${{ matrix.php }} - MySQL
132+
name: PHP 8.1 - MySQL
133+
134+
steps:
135+
- name: Checkout
136+
uses: actions/checkout@v2
137+
138+
- name: Setup PHP
139+
uses: shivammathur/setup-php@v2
140+
with:
141+
php-version: 8.1
142+
ini-values: mysqli.allow_local_infile=On
143+
tools: composer
144+
coverage: xdebug
145+
146+
- name: Install dependencies
147+
run:
148+
composer update
149+
150+
- name: PHPUnit
151+
env:
152+
DB_HOST: 127.0.0.1
153+
DB_IMAGE: mysql
154+
run: vendor/bin/phpunit --verbose
155+
156+
mysql-last:
157+
runs-on: ubuntu-20.04
158+
timeout-minutes: 10
159+
160+
strategy:
161+
fail-fast: true
162+
163+
services:
164+
mysql:
165+
image: mysql
166+
env:
167+
MYSQL_DATABASE: framework-tests
168+
MYSQL_ROOT_PASSWORD: password
169+
ports:
170+
- 3306:3306
171+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
172+
173+
name: PHP 8.2 - MySQL - Last
98174

99175
steps:
100176
- name: Checkout
@@ -103,7 +179,7 @@ jobs:
103179
- name: Setup PHP
104180
uses: shivammathur/setup-php@v2
105181
with:
106-
php-version: ${{ matrix.php }}
182+
php-version: 8.2
107183
ini-values: mysqli.allow_local_infile=On
108184
tools: composer
109185
coverage: xdebug

0 commit comments

Comments
 (0)