|
15 | 15 | continue-on-error: ${{ matrix.experimental }} |
16 | 16 | strategy: |
17 | 17 | matrix: |
18 | | - php-version: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] |
| 18 | + php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] |
19 | 19 | os: [ubuntu-latest] |
20 | 20 | experimental: [false] |
21 | 21 | composer-options: [''] |
|
51 | 51 | - name: Install dependencies |
52 | 52 | run: composer install --no-interaction ${{ matrix.composer-options }} |
53 | 53 | - name: Install motranslator |
54 | | - if: ${{ matrix.php-version == '7.1' }} |
55 | | - run: composer require phpmyadmin/motranslator:^3.0 |
| 54 | + if: ${{ matrix.php-version == '7.2' }} |
| 55 | + run: composer require phpmyadmin/motranslator:^3.0 --with-all-dependencies --no-interaction |
56 | 56 | - name: Run php tests |
57 | 57 | run: composer run phpunit |
58 | 58 | - name: Send coverage |
|
63 | 63 | if: github.repository == 'phpmyadmin/sql-parser' |
64 | 64 | with: |
65 | 65 | cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}" |
| 66 | + |
| 67 | + php-benchmark: |
| 68 | + name: Benchmark on PHP ${{ matrix.php-version }} and ${{ matrix.os }} |
| 69 | + runs-on: ${{ matrix.os }} |
| 70 | + continue-on-error: ${{ matrix.experimental }} |
| 71 | + strategy: |
| 72 | + matrix: |
| 73 | + php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] |
| 74 | + os: [ubuntu-latest] |
| 75 | + experimental: [false] |
| 76 | + composer-options: [''] |
| 77 | + include: |
| 78 | + - { php-version: 'nightly', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-reqs' } |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v3 |
| 81 | + with: |
| 82 | + # Fetch some commits for Scrutinizer coverage upload |
| 83 | + fetch-depth: 15 |
| 84 | + - name: Use PHP ${{ matrix.php-version }} |
| 85 | + uses: shivammathur/setup-php@v2 |
| 86 | + with: |
| 87 | + php-version: ${{ matrix.php-version }} |
| 88 | + # phar, json and curl are used by composer |
| 89 | + # json is used by testing code |
| 90 | + # dom, json, mbstring, libxml, xml, xmlwriter are used by phpunit |
| 91 | + # tokenizer, xmlwriter and simplexml are used by phpcs |
| 92 | + # ctype is used by Psalm |
| 93 | + extensions: none, mbstring, phar, json, curl, tokenizer, xml, xmlwriter, simplexml, libxml, dom, ctype |
| 94 | + coverage: xdebug |
| 95 | + - name: Get Composer Cache Directory |
| 96 | + id: composer-cache |
| 97 | + run: | |
| 98 | + echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 99 | + - name: Restore cache |
| 100 | + uses: actions/cache@v3 |
| 101 | + with: |
| 102 | + path: ${{ steps.composer-cache.outputs.dir }} |
| 103 | + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
| 104 | + restore-keys: | |
| 105 | + ${{ runner.os }}-composer- |
| 106 | + - name: Install dependencies |
| 107 | + run: composer install --no-interaction ${{ matrix.composer-options }} |
| 108 | + - name: Install motranslator |
| 109 | + if: ${{ matrix.php-version == '7.2' }} |
| 110 | + run: composer require phpmyadmin/motranslator:^3.0 --with-all-dependencies --no-interaction |
| 111 | + - name: Run benchmarks |
| 112 | + run: composer run phpbench |
0 commit comments