Skip to content

Added PHP 8.4 Support for Elasticsearch 7.17 || 7.x Compatibility #1134

Added PHP 8.4 Support for Elasticsearch 7.17 || 7.x Compatibility

Added PHP 8.4 Support for Elasticsearch 7.17 || 7.x Compatibility #1134

Workflow file for this run

name: PHP test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
php-version: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
os: [ubuntu-latest]
es-version: [7.17-SNAPSHOT]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: yaml, zip, curl
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install dependencies
run: |
composer install --prefer-dist
- name: PHP Coding Standards
run: |
composer run-script phpcs
- name: PHP Static Analysis Tool
run: |
composer run-script phpstan
- name: Unit tests
run: |
vendor/bin/phpunit -c phpunit.xml.dist
env:
TEST_SUITE: free
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs Elasticsearch ${{ matrix.es-version }}
uses: elastic/elastic-github-actions/elasticsearch@trial-license
with:
stack-version: ${{ matrix.es-version }}
- name: Integration tests
run: |
vendor/bin/phpunit -c phpunit-integration-tests.xml
env:
ELASTICSEARCH_URL: http://localhost:9200