Skip to content

Merge pull request #345 from Arhell/fix #174

Merge pull request #345 from Arhell/fix

Merge pull request #345 from Arhell/fix #174

Workflow file for this run

on:
- pull_request
- push
name: build
jobs:
tests:
name: PHP ${{ matrix.php-version }} / ES ${{ matrix.es-version }}
env:
extensions: curl, mbstring, dom, intl
key: cache-v1
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
es-version:
- 8.1.3
- 7.14.0
- 7.7.0
- 6.8.9
- 5.6.16
steps:
- name: Service elastisearch 8.1.3.
if: matrix.es-version == '8.1.3'
run: |
docker network create somenetwork
docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -e "http.publish_host=127.0.0.1" -e "transport.host=127.0.0.1" -e "indices.id_field_data.enabled=true" -e "xpack.security.enabled=false" elasticsearch:${{ matrix.es-version }}
- name: Service elastisearch < 8.1.3.
if: matrix.es-version != '8.1.3'
run: |
docker network create somenetwork
docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -e "http.publish_host=127.0.0.1" -e "transport.host=127.0.0.1" elasticsearch:${{ matrix.es-version }}
- name: Checkout.
uses: actions/checkout@v3
- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
- name: Install dependencies with composer.
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader
- name: Wait for Elasticsearch server to start.
run: wget --retry-connrefused --waitretry=3 --timeout=30 -t 10 -O /dev/null http://127.0.0.1:9200
- name: Run tests with phpunit.
run: ES_VERSION=${{ matrix.es-version }} vendor/bin/phpunit