Redo sniffing connection pool tests (#174) #224
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
name: Integration with Unreleased OpenSearch | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
entry: | |
- { opensearch_ref: '1.x' } | |
- { opensearch_ref: '2.0' } | |
- { opensearch_ref: '2.x' } | |
- { opensearch_ref: 'main' } | |
steps: | |
- name: Checkout OpenSearch | |
uses: actions/checkout@v2 | |
with: | |
repository: opensearch-project/OpenSearch | |
ref: ${{ matrix.entry.opensearch_ref }} | |
path: opensearch | |
- name: Assemble OpenSearch | |
run: | | |
cd opensearch | |
./gradlew assemble | |
# This step runs the docker image generated during gradle assemble in OpenSearch. It is tagged as opensearch:test. | |
# Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190 | |
- name: Run Docker Image | |
run: | | |
docker run -p 9200:9200 -p 9600:9600 -d -e "discovery.type=single-node" -e "bootstrap.memory_lock=true" opensearch:test | |
sleep 90 | |
- name: Checkout PHP Client | |
uses: actions/checkout@v2 | |
- name: Use PHP 8.1 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
extensions: yaml, zip, curl | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: | | |
composer install --prefer-dist | |
- name: Wait for Search server | |
run: php ./.github/wait_for_es.php | |
- name: Integration tests | |
run: | | |
composer run integration | |
env: | |
OPENSEARCH_URL: 'http://localhost:9200' |