diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 5746081c0..e3cc21b4c 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -113,6 +113,37 @@ jobs: run: | docker compose --file=docker/compose.proxy.yaml --file=docker/compose.es.yaml logs es01 es02 + phpunit-lowest: + runs-on: 'ubuntu-24.04' + name: 'PHPUnit (lowest deps, PHP ${{ matrix.php }})' + timeout-minutes: 10 + strategy: + matrix: + php: + - '8.1' + fail-fast: false + steps: + - name: 'Checkout' + uses: 'actions/checkout@v4' + + - name: 'Setup PHP' + uses: 'shivammathur/setup-php@v2' + with: + php-version: '${{ matrix.php }}' + coverage: 'none' + tools: 'composer:v2' + extensions: 'curl, json, mbstring, openssl' + + - name: 'Install dependencies with Composer (lowest)' + uses: 'ramsey/composer-install@v3' + with: + dependency-versions: 'lowest' + composer-options: '--prefer-dist --prefer-stable' + + - name: 'Run unit tests' + run: | + vendor/bin/phpunit --group unit + phpstan: runs-on: 'ubuntu-24.04' name: 'PHPStan' diff --git a/CHANGELOG.md b/CHANGELOG.md index b4e7e1579..6c7c7161a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Added support for "search after" based pagination [#1645](https://github.com/ruflin/Elastica/issues/1645) * Added support for the `seq_no_primary_term` search option and the `if_seq_no` / `if_primary_term` index options to enable optimistic concurrency control [#2284](https://github.com/ruflin/Elastica/pull/2284) ### Changed +* Added a `phpunit-lowest` CI job that installs dependencies with `--prefer-lowest --prefer-stable` and runs the unit tests on PHP 8.1, ensuring that the minimum constraints declared in `composer.json` keep working. ### Deprecated ### Removed ### Fixed