-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #513 from ClearcodeHQ/es7-compatibility
Make sure it works against elasticsearch 7.* library - closes #512
- Loading branch information
Showing
5 changed files
with
63 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: 'Pytest run' | ||
description: 'Greet someone' | ||
inputs: | ||
python-version: # id of input | ||
description: 'Python version to use' | ||
required: true | ||
elasticsearch: | ||
description: 'Elasticsearch version' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/elasticsearch | ||
key: elasticsearch-${{ inputs.elasticsearch }} | ||
- name: Setup elasticsearch | ||
uses: ankane/setup-elasticsearch@v1 | ||
with: | ||
elasticsearch-version: ${{ inputs.elasticsearch }} | ||
- name: Prep environment | ||
shell: bash | ||
run: pip install pipenv && pipenv install --dev --skip-lock | ||
- name: Downgrade elasticsearch | ||
shell: bash | ||
run: pipenv run pip install "elasticsearch<8" | ||
- name: Run test | ||
shell: bash | ||
run: pipenv run pytest --elasticsearch-executable=$ES_HOME/bin/elasticsearch -n 0 --cov-report=xml | ||
- name: Run xdist test | ||
shell: bash | ||
run: pipenv run pytest --elasticsearch-executable=$ES_HOME/bin/elasticsearch -n 1 --cov-report=xml:coverage-xdist.xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
flags: linux,elastic-${{ inputs.elasticsearch }} | ||
env_vars: OS, PYTHON | ||
fail_ci_if_error: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed compatibility with elasticsearch client 7.x |
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