Skip to content

Commit 79d08db

Browse files
darthf1soyuka
authored andcommitted
feat(elasticsearch): add support for v9 (#7180)
Co-authored-by: darthf1 <17253332+darthf1@users.noreply.github.com>
1 parent 9662412 commit 79d08db

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
@@ -777,8 +777,60 @@ jobs:
777777
php-coveralls --coverage_clover=build/logs/behat/clover.xml
778778
continue-on-error: true
779779

780-
elasticsearch:
781-
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch)
780+
elasticsearch-v9:
781+
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v9)
782+
runs-on: ubuntu-latest
783+
timeout-minutes: 20
784+
strategy:
785+
matrix:
786+
php:
787+
- '8.4'
788+
fail-fast: false
789+
env:
790+
APP_ENV: elasticsearch
791+
steps:
792+
- name: Checkout
793+
uses: actions/checkout@v4
794+
- name: Configure sysctl limits
795+
run: |
796+
sudo swapoff -a
797+
sudo sysctl -w vm.swappiness=1
798+
sudo sysctl -w fs.file-max=262144
799+
sudo sysctl -w vm.max_map_count=262144
800+
- name: Runs Elasticsearch
801+
uses: elastic/elastic-github-actions/elasticsearch@master
802+
with:
803+
stack-version: '9.0.0'
804+
security-enabled: false
805+
- name: Setup PHP
806+
uses: shivammathur/setup-php@v2
807+
with:
808+
php-version: ${{ matrix.php }}
809+
tools: pecl, composer
810+
extensions: intl, bcmath, curl, openssl, mbstring, mongodb
811+
coverage: none
812+
ini-values: memory_limit=-1
813+
- name: Get composer cache directory
814+
id: composercache
815+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
816+
- name: Cache dependencies
817+
uses: actions/cache@v4
818+
with:
819+
path: ${{ steps.composercache.outputs.dir }}
820+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
821+
restore-keys: ${{ runner.os }}-composer-
822+
- name: Update project dependencies
823+
run: |
824+
composer global require soyuka/pmu
825+
composer global config allow-plugins.soyuka/pmu true --no-interaction
826+
composer global link .
827+
- name: Clear test app cache
828+
run: tests/Fixtures/app/console cache:clear --ansi
829+
- name: Run Behat tests
830+
run: vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
831+
832+
elasticsearch-v8:
833+
name: Behat (PHP ${{ matrix.php }}) (Elasticsearch v8)
782834
runs-on: ubuntu-latest
783835
timeout-minutes: 20
784836
strategy:
@@ -824,6 +876,7 @@ jobs:
824876
composer global require soyuka/pmu
825877
composer global config allow-plugins.soyuka/pmu true --no-interaction
826878
composer global link .
879+
composer require elasticsearch/elasticsearch "^8.4" -W
827880
- name: Clear test app cache
828881
run: tests/Fixtures/app/console cache:clear --ansi
829882
- name: Run Behat tests

composer.json

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

0 commit comments

Comments
 (0)