-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run tests against OpenSearch version 2
- Loading branch information
Showing
14 changed files
with
219 additions
and
195 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,163 +1,177 @@ | ||
name: Test application | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- '[0-9]+.[0-9]+' | ||
- '[0-9]+.x' | ||
pull_request: | ||
push: | ||
branches: | ||
- '[0-9]+.[0-9]+' | ||
- '[0-9]+.x' | ||
|
||
jobs: | ||
code-style: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: 8.1 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --prefer-dist | ||
|
||
- name: Check code style | ||
run: vendor/bin/ecs | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: 8.1 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --prefer-dist | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyse | ||
|
||
unit-test: | ||
name: 'Run unit tests with php ${{ matrix.php-version }} with symfony ${{ matrix.symfony-version}}' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php-version: '8.0' | ||
symfony-version: '5.4.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '5.4.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '6.0.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '6.1.*' | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: pcov | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: | | ||
composer validate --strict | ||
composer require --no-update symfony/serializer:${{ matrix.symfony-version }} | ||
composer install --no-interaction --prefer-dist | ||
- name: Run tests | ||
run: vendor/bin/phpunit --testsuite=unit --coverage-clover=coverage.xml | ||
|
||
functional-test: | ||
name: 'Run functional tests' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: 8.1 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --prefer-dist | ||
|
||
- name: Setup OpenSearch | ||
uses: ankane/setup-opensearch@v1 | ||
with: | ||
opensearch-version: '1.2' | ||
|
||
- name: Run tests | ||
run: vendor/bin/phpunit --testsuite=functional | ||
code-style: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: 8.1 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --prefer-dist | ||
|
||
- name: Check code style | ||
run: vendor/bin/ecs | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: 8.1 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --prefer-dist | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyse | ||
|
||
unit-test: | ||
name: 'Run unit tests with php ${{ matrix.php-version }} with symfony ${{ matrix.symfony-version}}' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- php-version: '8.0' | ||
symfony-version: '5.4.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '5.4.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '6.0.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '6.1.*' | ||
|
||
- php-version: '8.1' | ||
symfony-version: '6.2.*' | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: pcov | ||
php-version: ${{ matrix.php-version }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: | | ||
composer validate --strict | ||
composer require --no-update symfony/serializer:${{ matrix.symfony-version }} | ||
composer install --no-interaction --prefer-dist | ||
- name: Run tests | ||
run: vendor/bin/phpunit --testsuite=unit --coverage-clover=coverage.xml | ||
|
||
functional-test: | ||
name: 'Run functional tests with OS ${{ matrix.opensearch-version }}' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- opensearch-version: '1.3' | ||
opensearch-composer-version: '^1' | ||
- opensearch-version: '2.4' | ||
opensearch-composer-version: '^2' | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: 8.1 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache-dir | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
id: composer-cache | ||
with: | ||
path: ${{ steps.composer-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: | | ||
composer require --no-update opensearch-project/opensearch-php:${{ matrix.opensearch-composer-version }} | ||
composer install --no-interaction --prefer-dist | ||
- name: Setup OpenSearch | ||
uses: ankane/setup-opensearch@v1 | ||
with: | ||
opensearch-version: ${{ matrix.opensearch-version }} | ||
|
||
- name: Run tests | ||
run: vendor/bin/phpunit --testsuite=functional |
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
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
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
Oops, something went wrong.