Skip to content

Commit 560a585

Browse files
committed
[CI] Backport usage of db service for 8.1
Nightly already uses them. We're running into port clashes otherwise. Closes GH-16647
1 parent 27e8860 commit 560a585

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.github/actions/setup-x64/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@ runs:
66
run: |
77
set -x
88
9-
sudo service mysql start
10-
sudo service postgresql start
119
sudo service slapd start
12-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
13-
# Ensure local_infile tests can run.
14-
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
15-
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
16-
sudo -u postgres psql -c "CREATE DATABASE test;"
1710
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
1811
sudo locale-gen de_DE
1912

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ runs:
2828
export PDO_OCI_TEST_USER="system"
2929
export PDO_OCI_TEST_PASS="pass"
3030
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
31+
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
32+
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
33+
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
34+
fi
3135
export SKIP_IO_CAPTURE_TESTS=1
3236
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
3337
-d opcache.jit=${{ inputs.jitType }} \

.github/workflows/push.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ env:
4343
jobs:
4444
LINUX_X64:
4545
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
46+
services:
47+
mysql:
48+
image: mysql:8.3
49+
ports:
50+
- 3306:3306
51+
env:
52+
MYSQL_DATABASE: test
53+
MYSQL_ROOT_PASSWORD: root
54+
postgres:
55+
image: postgres
56+
ports:
57+
- 5432:5432
58+
env:
59+
POSTGRES_USER: postgres
60+
POSTGRES_PASSWORD: postgres
61+
POSTGRES_DB: test
4662
strategy:
4763
fail-fast: false
4864
matrix:

0 commit comments

Comments
 (0)