Raise min version to PHP 7.3
, check compatibility PHP 8.3
.
#175
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'infection.json.dist' | |
- 'psalm.xml' | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'infection.json.dist' | |
- 'psalm.xml' | |
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: | |
- 7.3 | |
- 7.4 | |
- 8.0 | |
- 8.1 | |
- 8.2 | |
- 8.3 | |
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 |