fix(OpenSearch): Support removing default from query
#194
Workflow file for this run
This file contains hidden or 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
| # Python unit tests | |
| name: Python | |
| on: | |
| push: | |
| branches: ['master'] | |
| pull_request: | |
| branches: ['master'] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: black | |
| run: black --check setup.py es | |
| - name: flake8 | |
| run: flake8 es | |
| - name: mypy | |
| run: mypy es | |
| test-elasticsearch7: | |
| runs-on: ubuntu-22.04 | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.17.27 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: "false" | |
| ports: | |
| - 9200:9200 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Wait for Elasticsearch 7.x | |
| run: | | |
| for i in $(seq 1 30); do | |
| curl -s http://localhost:9200/_cluster/health && break | |
| echo "Waiting for Elasticsearch 7.x..." | |
| sleep 2 | |
| done | |
| - name: Run tests on Elasticsearch 7.x | |
| run: | | |
| export ES_URI="http://localhost:9200" | |
| export ES_PORT=9200 | |
| pytest -v --cov=es --cov-report=xml es/tests | |
| test-elasticsearch8: | |
| runs-on: ubuntu-22.04 | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: "false" | |
| ports: | |
| - 9200:9200 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Wait for Elasticsearch 8.x | |
| run: | | |
| for i in $(seq 1 30); do | |
| curl -s http://localhost:9200/_cluster/health && break | |
| echo "Waiting for Elasticsearch 8.x..." | |
| sleep 2 | |
| done | |
| - name: Run tests on Elasticsearch 8.x | |
| env: | |
| ELASTIC_CLIENT_APIVERSIONING: "1" | |
| run: | | |
| export ES_URI="http://localhost:9200" | |
| export ES_PORT=9200 | |
| pytest -v --cov=es --cov-report=xml es/tests | |
| test-opensearch: | |
| runs-on: ubuntu-22.04 | |
| services: | |
| opensearch: | |
| image: opensearchproject/opensearch:2.19.0 | |
| env: | |
| discovery.type: single-node | |
| plugins.security.disabled: "true" | |
| DISABLE_INSTALL_DEMO_CONFIG: "true" | |
| ports: | |
| - 9200:9200 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Wait for OpenSearch 2.x | |
| run: | | |
| for i in $(seq 1 30); do | |
| curl -s http://localhost:9200/_cluster/health && break | |
| echo "Waiting for OpenSearch 2.x..." | |
| sleep 2 | |
| done | |
| - name: Run tests on OpenSearch 2.x | |
| run: | | |
| export ES_DRIVER=odelasticsearch | |
| export ES_URI="http://localhost:9200" | |
| export ES_PORT=9200 | |
| export ES_SCHEME=http | |
| export ES_V2=True | |
| export ES_SUPPORT_DATETIME_PARSE=False | |
| pytest -v --cov=es --cov-report=xml es/tests |