chore: add 8.5 support #3857
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit Tests (Linux) | |
| # whenever master has a PR or is pushed to | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| # for each of the following versions of PHP, with and without --prefer-lowest | |
| matrix: | |
| include: | |
| - php-versions: '8.1' | |
| composer-options: '' | |
| - php-versions: '8.1' | |
| composer-options: '--prefer-lowest' | |
| - php-versions: '8.2' | |
| composer-options: '' | |
| - php-versions: '8.2' | |
| composer-options: '--prefer-lowest' | |
| - php-versions: '8.3' | |
| composer-options: '' | |
| - php-versions: '8.3' | |
| composer-options: '--prefer-lowest' | |
| - php-versions: '8.4' | |
| composer-options: '' | |
| - php-versions: '8.4' | |
| composer-options: '--prefer-lowest' | |
| - php-versions: '8.5' | |
| composer-options: '' | |
| # set the name for each job | |
| name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-options }} | |
| # set up environment variables used by unit tests | |
| env: | |
| AWS_ACCESS_KEY_ID: foo | |
| AWS_SECRET_ACCESS_KEY: bar | |
| AWS_CSM_ENABLED: false | |
| AWS_SUPPRESS_PHP_DEPRECATION_WARNING: true | |
| steps: | |
| # sets up the correct version of PHP with necessary config options | |
| - name: Setup PHP with JIT | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: none | |
| php-version: ${{ matrix.php-versions }} | |
| ini-values: memory_limit=4G, phar.readonly=false, opcache.enable=1, opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=128M | |
| # checkout the codebase from github | |
| - name: Checkout codebase | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| # validate composer files | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| # get dependencies | |
| - name: Install dependencies | |
| run: | | |
| if [[ "${{ matrix.composer-options }}" == "--prefer-lowest" ]]; then | |
| # PHP 8.3+ needs PSR HTTP Message 2.0+ and compatible Guzzle packages | |
| if [[ "${{ matrix.php-versions }}" == "8.3" ]] || [[ "${{ matrix.php-versions }}" == "8.4" ]]; then | |
| composer update ${{ matrix.composer-options }} --no-interaction --prefer-dist --with-all-dependencies | |
| composer update psr/http-message guzzlehttp/psr7 guzzlehttp/guzzle --with-all-dependencies --no-interaction | |
| if [[ "${{ matrix.php-versions }}" == "8.4" ]]; then | |
| composer update phpunit/phpunit:^9.6.18 --with-all-dependencies --no-interaction | |
| fi | |
| else | |
| composer update ${{ matrix.composer-options }} --no-interaction --prefer-dist --with-all-dependencies | |
| fi | |
| else | |
| composer update ${{ matrix.composer-options }} --no-interaction --prefer-dist | |
| fi | |
| # run tests | |
| - name: Run test suite | |
| run: make test | |
| # static analysis | |
| - name: Static analysis | |
| run: | | |
| composer require --dev nette/neon "^3.4.4" phpstan/phpstan "2.1.1" --ignore-platform-req=php --update-with-all-dependencies | |
| vendor/bin/phpstan analyse src | |
| # generate package | |
| - if: ${{ matrix.composer-options == '' }} | |
| name: Package generation | |
| run: | | |
| composer config platform.php 8.1 | |
| composer update | |
| make package |