name: Test
inputs:
  runTestsParameters:
    default: ''
    required: false
  enableOpcache:
    default: 'false'
    required: false
  jitType:
    default: 'disable'
    required: false
runs:
  using: composite
  steps:
    - shell: bash
      run: |
        set -x
        export SKIP_IO_CAPTURE_TESTS=1
        export STACK_LIMIT_DEFAULTS_CHECK=1
        sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
          ${{ inputs.enableOpcache == 'true' && '-d zend_extension=opcache.so -d opcache.enable_cli=1' || '' }} \
          -d opcache.jit=${{ inputs.jitType }} \
          -d opcache.jit_buffer_size=64M \
          -j$(nproc) \
          -g FAIL,BORK,LEAK,XLEAK \
          --no-progress \
          --show-diff \
          --show-slow 1000 \
          --set-timeout 120
