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