|
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | 11 | PHP_VERSION: [ '8.1', '8.3', '8.4' ] |
| 12 | + OS: [ubuntu-latest, ubuntu-24.04] |
12 | 13 | name: Test Apache action |
13 | | - runs-on: ubuntu-latest |
| 14 | + runs-on: ${{ matrix.OS }} |
14 | 15 | steps: |
15 | 16 | - name: Create fake site |
16 | 17 | run: | |
|
23 | 24 | uses: shivammathur/setup-php@v2 |
24 | 25 | with: |
25 | 26 | php-version: ${{ matrix.PHP_VERSION }} |
| 27 | + extensions: :xdebug |
| 28 | + - name: Ensure Xdebug is not running |
| 29 | + run: | |
| 30 | + php -m |
| 31 | + php -r "if (extension_loaded('xdebug')) trigger_error('xdebug on', E_USER_ERROR);" |
26 | 32 | - uses: actions/checkout@v2 |
27 | 33 | - name: Setup Apache |
28 | 34 | uses: ./ |
|
33 | 39 | - name: Test fake site |
34 | 40 | run: | |
35 | 41 | curl -sSf http://127.0.0.1:9090 |
| 42 | + - name: Ensure Xdebug is not running |
| 43 | + run: | |
| 44 | + php -m |
| 45 | + php -r "if (extension_loaded('xdebug')) trigger_error('xdebug on', E_USER_ERROR);" |
| 46 | + test-with-xdebug: |
| 47 | + name: Test Apache action |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - name: Create fake site |
| 51 | + run: | |
| 52 | + mkdir /tmp/sut |
| 53 | + echo '<?php' | sudo tee /tmp/sut/index.php |
| 54 | + echo ' $text = "It works!";' | sudo tee -a /tmp/sut/index.php |
| 55 | + echo ' print "<strong>$text</strong>";' | sudo tee -a /tmp/sut/index.php |
| 56 | + shell: bash |
| 57 | + - name: Setup PHP |
| 58 | + uses: shivammathur/setup-php@v2 |
| 59 | + with: |
| 60 | + php-version: 8.4 |
| 61 | + extensions: xdebug |
| 62 | + - name: Ensure Xdebug is running |
| 63 | + run: | |
| 64 | + php -m |
| 65 | + php -r "if (!extension_loaded('xdebug')) trigger_error('xdebug on', E_USER_ERROR);" |
| 66 | + - uses: actions/checkout@v2 |
| 67 | + - name: Setup Apache |
| 68 | + uses: ./ |
| 69 | + with: |
| 70 | + php-version: 8.4 |
| 71 | + site-directory: /tmp/sut |
| 72 | + http-port: 9090 |
| 73 | + - name: Test fake site |
| 74 | + run: | |
| 75 | + curl -sSf http://127.0.0.1:9090 |
| 76 | + - name: Ensure Xdebug is running |
| 77 | + run: | |
| 78 | + php -m |
| 79 | + php -r "if (!extension_loaded('xdebug')) trigger_error('xdebug on', E_USER_ERROR);" |
0 commit comments