diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 6a9ad89fd7..a40945f768 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -36,8 +36,15 @@ jobs: - '7.4' - '8.0' - '8.1' + dependencies: + - 'highest' elasticsearch: - '7.15.2' + include: + # Test with the lowest set of dependencies + - dependencies: 'lowest' + php: '7.2' + elasticsearch: '7.15.2' fail-fast: false steps: - name: 'Checkout' @@ -51,23 +58,11 @@ jobs: tools: 'pecl, composer:v2' extensions: 'curl, json, mbstring, openssl' - - name: 'Get composer cache directory' - id: 'composer_cache' - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: 'Cache dependencies' - uses: 'actions/cache@v2' + - name: 'Install dependencies with Composer' + uses: 'ramsey/composer-install@v2' with: - path: '${{ steps.composer_cache.outputs.dir }}' - key: '${{ runner.os }}-composer-php${{ matrix.php }}-${{ hashFiles(''**/composer.json'') }}' - restore-keys: | - ${{ runner.os }}-composer-php${{ matrix.php }}- - ${{ runner.os }}-composer- - - - name: 'Update dependencies' - run: | - composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_flags }} + dependency-versions: '${{ matrix.dependencies }}' + composer-options: '--prefer-dist' - name: 'Run unit tests' run: | @@ -115,23 +110,11 @@ jobs: tools: 'pecl, composer:v2' extensions: 'curl, json, mbstring, openssl' - - name: 'Get composer cache directory' - id: 'composer_cache' - run: | - echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: 'Cache dependencies' - uses: 'actions/cache@v2' + - name: 'Install dependencies with Composer' + uses: 'ramsey/composer-install@v2' with: - path: '${{ steps.composer_cache.outputs.dir }}' - key: '${{ runner.os }}-composer-php${{ matrix.php }}-${{ hashFiles(''**/composer.json'') }}' - restore-keys: | - ${{ runner.os }}-composer-php${{ matrix.php }}- - ${{ runner.os }}-composer- - - - name: 'Update dependencies' - run: | - composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_flags }} + composer-options: '--prefer-dist' - name: 'Run phpstan' run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index d5f1ad9385..4ecfa81e83 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Backward Compatibility Breaks ### Added ### Changed +* Use `ramsey/composer-install` to simplify CI jobs and test with the lowest set of dependencies [#2113](https://github.com/ruflin/Elastica/pull/2113) +* Bumped `elasticsearch/elasticsearch` to `7.10` to be able to use `OpenPointInTime` class [#2113](https://github.com/ruflin/Elastica/pull/2113) * Updated `php-cs-fixer` to `3.9.5` [#2110](https://github.com/ruflin/Elastica/pull/2110) ### Deprecated ### Removed diff --git a/composer.json b/composer.json index 936893b9ff..b6f59cff15 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": "^7.2 || ^8.0", "ext-json": "*", - "elasticsearch/elasticsearch": "^7.1.1", + "elasticsearch/elasticsearch": "^7.10", "nyholm/dsn": "^2.0.0", "psr/log": "^1.0 || ^2.0 || ^3.0", "symfony/deprecation-contracts": "^2.2 || ^3.0",