@@ -769,119 +769,25 @@ jobs:
769769 php-coveralls --coverage_clover=build/logs/behat/clover.xml
770770 continue-on-error : true
771771
772- elasticsearch-v9 :
773- name : Behat (PHP ${{ matrix.php }}) (Elasticsearch v9)
774- runs-on : ubuntu-latest
775- timeout-minutes : 20
776- strategy :
777- matrix :
778- php :
779- - ' 8.5'
780- fail-fast : false
781- env :
782- APP_ENV : elasticsearch
783- steps :
784- - name : Checkout
785- uses : actions/checkout@v6
786- - name : Configure sysctl limits
787- run : |
788- sudo swapoff -a
789- sudo sysctl -w vm.swappiness=1
790- sudo sysctl -w fs.file-max=262144
791- sudo sysctl -w vm.max_map_count=262144
792- - name : Runs Elasticsearch
793- uses : elastic/elastic-github-actions/elasticsearch@master
794- with :
795- stack-version : ' 9.0.0'
796- security-enabled : false
797- - name : Setup PHP
798- uses : shivammathur/setup-php@v2
799- with :
800- php-version : ${{ matrix.php }}
801- tools : pecl, composer
802- extensions : intl, bcmath, curl, openssl, mbstring, mongodb
803- coverage : none
804- ini-values : memory_limit=-1
805- - name : Get composer cache directory
806- id : composercache
807- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
808- - name : Cache dependencies
809- uses : actions/cache@v5
810- with :
811- path : ${{ steps.composercache.outputs.dir }}
812- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
813- restore-keys : ${{ runner.os }}-composer-
814- - name : Update project dependencies
815- run : |
816- composer global require soyuka/pmu
817- composer global config allow-plugins.soyuka/pmu true --no-interaction
818- composer global link .
819- - name : Clear test app cache
820- run : tests/Fixtures/app/console cache:clear --ansi
821- - name : Run Behat tests
822- run : vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
823-
824- elasticsearch-v8 :
825- name : Behat (PHP ${{ matrix.php }}) (Elasticsearch v8)
826- runs-on : ubuntu-latest
772+ elasticsearch :
773+ name : Behat (PHP ${{ matrix.php }}) (Elasticsearch ${{ matrix.elasticsearch-version }})
774+ runs-on : ubuntu-22.04
827775 timeout-minutes : 20
828776 strategy :
829777 matrix :
830- php :
831- - ' 8.5'
832- fail-fast : false
833- env :
834- APP_ENV : elasticsearch
835- steps :
836- - name : Checkout
837- uses : actions/checkout@v6
838- - name : Configure sysctl limits
839- run : |
840- sudo swapoff -a
841- sudo sysctl -w vm.swappiness=1
842- sudo sysctl -w fs.file-max=262144
843- sudo sysctl -w vm.max_map_count=262144
844- - name : Runs Elasticsearch
845- uses : elastic/elastic-github-actions/elasticsearch@master
846- with :
847- stack-version : ' 8.4.0'
848- security-enabled : false
849- - name : Setup PHP
850- uses : shivammathur/setup-php@v2
851- with :
852- php-version : ${{ matrix.php }}
853- tools : pecl, composer
854- extensions : intl, bcmath, curl, openssl, mbstring
855- coverage : none
856- ini-values : memory_limit=-1
857- - name : Get composer cache directory
858- id : composercache
859- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
860- - name : Cache dependencies
861- uses : actions/cache@v5
862- with :
863- path : ${{ steps.composercache.outputs.dir }}
864- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
865- restore-keys : ${{ runner.os }}-composer-
866- - name : Update project dependencies
867- run : |
868- composer global require soyuka/pmu
869- composer global config allow-plugins.soyuka/pmu true --no-interaction
870- composer global link .
871- composer require elasticsearch/elasticsearch "^8.4" -W
872- - name : Clear test app cache
873- run : tests/Fixtures/app/console cache:clear --ansi
874- - name : Run Behat tests
875- run : vendor/bin/behat --out=std --format=progress --profile=elasticsearch --no-interaction
876-
877- elasticsearch-v7 :
878- name : Behat (PHP ${{ matrix.php }}) (Elasticsearch v7)
879- runs-on : ubuntu-latest
880- timeout-minutes : 20
881- strategy :
882- matrix :
883- php :
884- - ' 8.3'
778+ include :
779+ - php : ' 8.5'
780+ elasticsearch-version : ' 9.0.0'
781+ elasticsearch-package : ' '
782+ extensions : ' intl, bcmath, curl, openssl, mbstring, mongodb'
783+ - php : ' 8.5'
784+ elasticsearch-version : ' 8.4.0'
785+ elasticsearch-package : ' elasticsearch/elasticsearch:^8.4'
786+ extensions : ' intl, bcmath, curl, openssl, mbstring'
787+ - php : ' 8.3'
788+ elasticsearch-version : ' 7.17.0'
789+ elasticsearch-package : ' elasticsearch/elasticsearch:prefer-lowest'
790+ extensions : ' intl, bcmath, curl, openssl, mbstring'
885791 fail-fast : false
886792 env :
887793 APP_ENV : elasticsearch
@@ -897,14 +803,14 @@ jobs:
897803 - name : Runs Elasticsearch
898804 uses : elastic/elastic-github-actions/elasticsearch@master
899805 with :
900- stack-version : ' 7.17.0 '
806+ stack-version : ${{ matrix.elasticsearch-version }}
901807 security-enabled : false
902808 - name : Setup PHP
903809 uses : shivammathur/setup-php@v2
904810 with :
905811 php-version : ${{ matrix.php }}
906812 tools : pecl, composer
907- extensions : intl, bcmath, curl, openssl, mbstring
813+ extensions : ${{ matrix.extensions }}
908814 coverage : none
909815 ini-values : memory_limit=-1
910816 - name : Get composer cache directory
@@ -921,7 +827,11 @@ jobs:
921827 composer global require soyuka/pmu
922828 composer global config allow-plugins.soyuka/pmu true --no-interaction
923829 composer global link .
924- composer update elasticsearch/elasticsearch --prefer-lowest
830+ if [ "${{ matrix.elasticsearch-package }}" == "elasticsearch/elasticsearch:^8.4" ]; then
831+ composer require elasticsearch/elasticsearch "^8.4" -W
832+ elif [ "${{ matrix.elasticsearch-package }}" == "elasticsearch/elasticsearch:prefer-lowest" ]; then
833+ composer update elasticsearch/elasticsearch --prefer-lowest
834+ fi
925835 - name : Clear test app cache
926836 run : tests/Fixtures/app/console cache:clear --ansi
927837 - name : Run Behat tests
0 commit comments