1name: Test
2inputs:
3  runTestsParameters:
4    default: ''
5    required: false
6  jitType:
7    default: 'disable'
8    required: false
9  idleCpu:
10    default: 'false'
11    required: false
12runs:
13  using: composite
14  steps:
15    - shell: bash
16      run: |
17        set -x
18        export MYSQL_TEST_USER=root
19        export MYSQL_TEST_PASSWD=root
20        if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
21          export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
22        fi
23        export PDO_MYSQL_TEST_USER=root
24        export PDO_MYSQL_TEST_PASS=root
25        export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
26        export PDO_DBLIB_TEST_USER="pdo_test"
27        export PDO_DBLIB_TEST_PASS="password"
28        export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
29        if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
30          export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
31        fi
32        export PDO_FIREBIRD_TEST_DATABASE=test.fdb
33        if [[ -z "$PDO_FIREBIRD_TEST_DSN" ]]; then
34          export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
35        fi
36        export PDO_FIREBIRD_TEST_PASS=test
37        export PDO_FIREBIRD_TEST_USER=test
38        export ODBC_TEST_USER="odbc_test"
39        export ODBC_TEST_PASS="password"
40        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"
41        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"
42        export SKIP_IO_CAPTURE_TESTS=1
43        export STACK_LIMIT_DEFAULTS_CHECK=1
44        sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
45          -d opcache.jit=${{ inputs.jitType }} \
46          -d opcache.protect_memory=1 \
47          -d opcache.jit_buffer_size=64M \
48          ${{ inputs.idleCpu == 'true' && '-j$(($(/usr/bin/nproc) - 1))' || '-j$(/usr/bin/nproc)' }} \
49          -g FAIL,BORK,LEAK,XLEAK \
50          --no-progress \
51          --offline \
52          --show-diff \
53          --show-slow 1000 \
54          --set-timeout 120
55