|
4 | 4 | push: |
5 | 5 | pull_request: |
6 | 6 | types: [opened, synchronize, reopened] |
7 | | - branches: |
8 | | - - master |
9 | | - - QA |
10 | | - - 6.0.x |
11 | 7 |
|
12 | 8 | jobs: |
13 | 9 | test-php: |
|
16 | 12 | continue-on-error: ${{ matrix.experimental }} |
17 | 13 | strategy: |
18 | 14 | matrix: |
19 | | - php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] |
| 15 | + php-version: ["8.1", "8.2"] |
20 | 16 | os: [ubuntu-latest] |
21 | 17 | experimental: [false] |
22 | 18 | composer-options: [''] |
|
61 | 57 | if: github.repository == 'phpmyadmin/sql-parser' |
62 | 58 | with: |
63 | 59 | cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}" |
| 60 | + |
| 61 | + php-benchmark: |
| 62 | + name: Benchmark on PHP ${{ matrix.php-version }} and ${{ matrix.os }} |
| 63 | + runs-on: ${{ matrix.os }} |
| 64 | + continue-on-error: ${{ matrix.experimental }} |
| 65 | + strategy: |
| 66 | + matrix: |
| 67 | + php-version: ["8.1", "8.2"] |
| 68 | + os: [ubuntu-latest] |
| 69 | + experimental: [false] |
| 70 | + composer-options: [''] |
| 71 | + include: |
| 72 | + - { php-version: 'nightly', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-reqs' } |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v3 |
| 75 | + with: |
| 76 | + # Fetch some commits for Scrutinizer coverage upload |
| 77 | + fetch-depth: 15 |
| 78 | + - name: Use PHP ${{ matrix.php-version }} |
| 79 | + uses: shivammathur/setup-php@v2 |
| 80 | + with: |
| 81 | + php-version: ${{ matrix.php-version }} |
| 82 | + # phar, json and curl are used by composer |
| 83 | + # json is used by testing code |
| 84 | + # dom, json, mbstring, libxml, xml, xmlwriter are used by phpunit |
| 85 | + # tokenizer, xmlwriter and simplexml are used by phpcs |
| 86 | + # ctype is used by Psalm |
| 87 | + extensions: none, mbstring, phar, json, curl, tokenizer, xml, xmlwriter, simplexml, libxml, dom, ctype |
| 88 | + coverage: xdebug |
| 89 | + - name: Get Composer Cache Directory |
| 90 | + id: composer-cache |
| 91 | + run: | |
| 92 | + echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 93 | + - name: Restore cache |
| 94 | + uses: actions/cache@v3 |
| 95 | + with: |
| 96 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 97 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 98 | + restore-keys: | |
| 99 | + ${{ runner.os }}-composer- |
| 100 | + - name: Install dependencies |
| 101 | + run: composer install --no-interaction ${{ matrix.composer-options }} |
| 102 | + - name: Run benchmarks |
| 103 | + run: composer run phpbench |
0 commit comments