1name: Test
2inputs:
3  testArtifacts:
4    default: null
5    required: false
6  runTestsParameters:
7    default: ''
8    required: false
9  jitType:
10    default: 'disable'
11    required: false
12runs:
13  using: composite
14  steps:
15    - shell: bash
16      run: |
17        set -x
18        export SKIP_IO_CAPTURE_TESTS=1
19        export CI_NO_IPV6=1
20        export TEST_PHP_JUNIT=junit.out.xml
21        export STACK_LIMIT_DEFAULTS_CHECK=1
22        sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
23          -d opcache.jit=${{ inputs.jitType }} \
24          -d opcache.protect_memory=1 \
25          -d opcache.jit_buffer_size=64M \
26          -j$(($(sysctl -n hw.ncpu) - 1)) \
27          -g FAIL,BORK,LEAK,XLEAK \
28          --no-progress \
29          --offline \
30          --show-diff \
31          --show-slow 1000 \
32          --set-timeout 120
33    - uses: actions/upload-artifact@v4
34      if: always() && inputs.testArtifacts != null
35      with:
36        name: ${{ github.job }}_${{ inputs.testArtifacts }}
37        path: ${{ github.workspace }}/junit.out.xml
38        retention-days: 5
39