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        export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
34        export PDO_FIREBIRD_TEST_PASS=test
35        export PDO_FIREBIRD_TEST_USER=test
36        export ODBC_TEST_USER="odbc_test"
37        export ODBC_TEST_PASS="password"
38        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"
39        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"
40        export SKIP_IO_CAPTURE_TESTS=1
41        export STACK_LIMIT_DEFAULTS_CHECK=1
42        sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
43          -d opcache.jit=${{ inputs.jitType }} \
44          -d opcache.protect_memory=1 \
45          -d opcache.jit_buffer_size=64M \
46          ${{ inputs.idleCpu == 'true' && '-j$(($(/usr/bin/nproc) - 1))' || '-j$(/usr/bin/nproc)' }} \
47          -g FAIL,BORK,LEAK,XLEAK \
48          --no-progress \
49          --offline \
50          --show-diff \
51          --show-slow 1000 \
52          --set-timeout 120
53