Skip to content

Commit f42cef6

Browse files
KentarouTakedailuuu1994
authored andcommitted
Fix pgsql and mysql tests on GitHub actions
The tests accidentally stopped running on PHP 8.3+. Closes GH-12475
1 parent 7da6c0f commit f42cef6

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

.github/actions/test-linux/action.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ runs:
3131
export PDO_OCI_TEST_USER="system"
3232
export PDO_OCI_TEST_PASS="pass"
3333
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
34-
export PGSQL_TEST_CONNSTR="host=postgres dbname=test port=5432 user=postgres password=postgres"
35-
export PDO_PGSQL_TEST_DSN="host=postgres dbname=test port=5432 user=postgres password=postgres"
34+
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
35+
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
36+
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
37+
fi
3638
export ODBC_TEST_USER="odbc_test"
3739
export ODBC_TEST_PASS="password"
3840
export ODBC_TEST_DSN="Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=odbc;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS"

.github/workflows/nightly.yml

-4
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,6 @@ jobs:
158158
runs-on: ubuntu-latest
159159
container:
160160
image: ubuntu:${{ (matrix.branch.ref == 'PHP-8.3' || matrix.branch.ref == 'master') && '22.04' || '20.04' }}
161-
env:
162-
MYSQL_TEST_HOST: mysql
163-
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
164-
PDO_MYSQL_TEST_HOST: mysql
165161
services:
166162
mysql:
167163
image: mysql:8

.github/workflows/push.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ jobs:
4848
services:
4949
mysql:
5050
image: mysql:8
51+
ports:
52+
- 3306:3306
5153
env:
5254
MYSQL_DATABASE: test
5355
MYSQL_ROOT_PASSWORD: root
5456
postgres:
5557
image: postgres
58+
ports:
59+
- 5432:5432
5660
env:
5761
POSTGRES_USER: postgres
5862
POSTGRES_PASSWORD: postgres
5963
POSTGRES_DB: test
60-
env:
61-
MYSQL_TEST_HOST: mysql
62-
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
63-
PDO_MYSQL_TEST_HOST: mysql
6464
strategy:
6565
fail-fast: false
6666
matrix:

0 commit comments

Comments
 (0)