Skip to content

Finishing #143

Finishing #143 #248

Workflow file for this run

name: Integration with Unreleased OpenSearch
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opensearch_ref: [ '1.x', '2.x', '2.0', 'main' ]
steps:
- name: Checkout OpenSearch
uses: actions/checkout@v3
with:
repository: opensearch-project/OpenSearch
ref: ${{ matrix.opensearch_ref }}
path: opensearch
- name: Get OpenSearch branch top
id: get-key
working-directory: opensearch
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT
- name: Assemble OpenSearch
working-directory: opensearch
run: ./gradlew assemble
- name: Run OpenSearch
working-directory: opensearch
run: |
./gradlew run &
for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done
- name: Checkout PHP Client
uses: actions/checkout@v2
- name: Use PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
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_opensearch.php
- name: Integration tests
run: |
composer run integration
env:
OPENSEARCH_URL: 'http://localhost:9200'