mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
66 lines
2.6 KiB
YAML
66 lines
2.6 KiB
YAML
name: Test
|
|
inputs:
|
|
testArtifacts:
|
|
default: null
|
|
required: false
|
|
runTestsParameters:
|
|
default: ''
|
|
required: false
|
|
jitType:
|
|
default: 'disable'
|
|
required: false
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- shell: bash
|
|
run: |
|
|
set -x
|
|
export MYSQL_TEST_USER=root
|
|
export MYSQL_TEST_PASSWD=root
|
|
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
|
|
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
|
|
fi
|
|
export PDO_MYSQL_TEST_USER=root
|
|
export PDO_MYSQL_TEST_PASS=root
|
|
export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
|
|
export PDO_DBLIB_TEST_USER="pdo_test"
|
|
export PDO_DBLIB_TEST_PASS="password"
|
|
export PHP_OCI8_TEST_USER="system"
|
|
export PHP_OCI8_TEST_PASS="pass"
|
|
export PHP_OCI8_TEST_DB="localhost/XEPDB1"
|
|
export PDO_OCI_TEST_USER="system"
|
|
export PDO_OCI_TEST_PASS="pass"
|
|
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
|
|
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
|
|
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
|
|
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
|
|
fi
|
|
export PDO_FIREBIRD_TEST_DATABASE=test.fdb
|
|
export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
|
|
export PDO_FIREBIRD_TEST_PASS=test
|
|
export PDO_FIREBIRD_TEST_USER=test
|
|
export ODBC_TEST_USER="odbc_test"
|
|
export ODBC_TEST_PASS="password"
|
|
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"
|
|
export PDO_ODBC_TEST_DSN="odbc:Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=pdo_odbc;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS"
|
|
export SKIP_IO_CAPTURE_TESTS=1
|
|
export TEST_PHP_JUNIT=junit.out.xml
|
|
export STACK_LIMIT_DEFAULTS_CHECK=1
|
|
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
|
|
-d opcache.jit=${{ inputs.jitType }} \
|
|
-d opcache.protect_memory=1 \
|
|
-d opcache.jit_buffer_size=64M \
|
|
-j$(/usr/bin/nproc) \
|
|
-g FAIL,BORK,LEAK,XLEAK \
|
|
--no-progress \
|
|
--offline \
|
|
--show-diff \
|
|
--show-slow 1000 \
|
|
--set-timeout 120
|
|
- uses: actions/upload-artifact@v3
|
|
if: always() && inputs.testArtifacts != null
|
|
with:
|
|
name: ${{ github.job }}_${{ inputs.testArtifacts }}
|
|
path: ${{ github.workspace }}/junit.out.xml
|
|
retention-days: 5
|