Skip to content

Commit 24a1cf5

Browse files
authored
feat(elasticsearch): add support for v9 (#7180)
Co-authored-by: darthf1 <[email protected]>
1 parent 04f252e commit 24a1cf5

File tree

2 files changed

+56
-3
lines changed

2 files changed

+56
-3
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,60 @@ jobs:
749749
php-coveralls --coverage_clover=build/logs/behat/clover.xml
750750
continue-on-error: true
751751

752-
elasticsearch:
753-
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch)
752+
elasticsearch-v9:
753+
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v9)
754+
runs-on: ubuntu-latest
755+
timeout-minutes: 20
756+
strategy:
757+
matrix:
758+
php:
759+
- '8.4'
760+
fail-fast: false
761+
env:
762+
APP_ENV: elasticsearch
763+
steps:
764+
- name: Checkout
765+
uses: actions/checkout@v4
766+
- name: Configure sysctl limits
767+
run: |
768+
sudo swapoff -a
769+
sudo sysctl -w vm.swappiness=1
770+
sudo sysctl -w fs.file-max=262144
771+
sudo sysctl -w vm.max_map_count=262144
772+
- name: Runs Elasticsearch
773+
uses: elastic/elastic-github-actions/elasticsearch@master
774+
with:
775+
stack-version: '9.0.0'
776+
security-enabled: false
777+
- name: Setup PHP
778+
uses: shivammathur/setup-php@v2
779+
with:
780+
php-version: ${{ matrix.php }}
781+
tools: pecl, composer
782+
extensions: intl, bcmath, curl, openssl, mbstring, mongodb
783+
coverage: none
784+
ini-values: memory_limit=-1
785+
- name: Get composer cache directory
786+
id: composercache
787+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
788+
- name: Cache dependencies
789+
uses: actions/cache@v4
790+
with:
791+
path: ${{ steps.composercache.outputs.dir }}
792+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
793+
restore-keys: ${{ runner.os }}-composer-
794+
- name: Update project dependencies
795+
run: |
796+
composer global require soyuka/pmu
797+
composer global config allow-plugins.soyuka/pmu true --no-interaction
798+
composer global link .
799+
- name: Clear test app cache
800+
run: tests/Fixtures/app/console cache:clear --ansi
801+
- name: Run Behat tests
802+
run: vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
803+
804+
elasticsearch-v8:
805+
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v8)
754806
runs-on: ubuntu-latest
755807
timeout-minutes: 20
756808
strategy:
@@ -796,6 +848,7 @@ jobs:
796848
composer global require soyuka/pmu
797849
composer global config allow-plugins.soyuka/pmu true --no-interaction
798850
composer global link .
851+
composer require elasticsearch/elasticsearch "^8.4" -W
799852
- name: Clear test app cache
800853
run: tests/Fixtures/app/console cache:clear --ansi
801854
- name: Run Behat tests

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"doctrine/mongodb-odm": "^2.10",
129129
"doctrine/mongodb-odm-bundle": "^5.0",
130130
"doctrine/orm": "^2.17 || ^3.0",
131-
"elasticsearch/elasticsearch": "^7.17 || ^8.4",
131+
"elasticsearch/elasticsearch": "^7.17 || ^8.4 || ^9.0",
132132
"friends-of-behat/mink-browserkit-driver": "^1.3.1",
133133
"friends-of-behat/mink-extension": "^2.2",
134134
"friends-of-behat/symfony-extension": "^2.1",

0 commit comments

Comments
 (0)