Skip to content

Commit

Permalink
Add emtpy string condition for py_marqo_branch (#748)
Browse files Browse the repository at this point in the history
Patch workflows with empty string py_marqo_branch
  • Loading branch information
wanliAlex authored Feb 1, 2024
1 parent ca81177 commit 2c2ada7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 33 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/arm64_docker_marqo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,14 @@ jobs:
repository: marqo-ai/marqo-api-tests
ref: ${{ github.event.inputs.api_tests_branch }}

- name: Set py_marqo_branch variable
id: set_var
- name: Set MQ_PY_MARQO_BRANCH variable
run: |
if [[ "${{ env.PY_MQ_API_TEST_BRANCH }}" == "marqo" ]]; then
echo "::set-output name=py_marqo_branch::marqo"
if [[ "${{ inputs.py_marqo_branch }}" == "marqo" ]] || [[ "${{ inputs.py_marqo_branch }}" == "" ]]; then
echo "MQ_PY_MARQO_BRANCH=marqo" >> $GITHUB_ENV
else
echo "::set-output name=py_marqo_branch::git+https://github.com/marqo-ai/py-marqo.git@${{ env.PY_MQ_API_TEST_BRANCH }}"
echo "MQ_PY_MARQO_BRANCH=git+https://github.com/marqo-ai/py-marqo.git@${{ inputs.py_marqo_branch }}" >> $GITHUB_ENV
fi
env:
PY_MQ_API_TEST_BRANCH: ${{ inputs.py_marqo_branch }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand All @@ -119,7 +116,6 @@ jobs:
export MQ_API_TEST_BRANCH=$(echo "${GITHUB_REF}" | cut -d'/' -f3-)
CUSTOM_TEST_IMG="${{ github.event.inputs.image_to_test }}"
export MQ_API_TEST_IMG=${CUSTOM_TEST_IMG:-"marqo_docker_0"}
export MQ_PY_MARQO_BRANCH=${{ steps.set_var.outputs.py_marqo_branch }}
tox -e py3-docker_marqo
Stop-Runner:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/cpu_docker_marqo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,13 @@ jobs:
# linting here

- name: Set py_marqo_branch variable
id: set_var
- name: Set MQ_PY_MARQO_BRANCH variable
run: |
if [[ "${{ env.PY_MQ_API_TEST_BRANCH }}" == "marqo" ]]; then
echo "::set-output name=py_marqo_branch::marqo"
if [[ "${{ inputs.py_marqo_branch }}" == "marqo" ]] || [[ "${{ inputs.py_marqo_branch }}" == "" ]]; then
echo "MQ_PY_MARQO_BRANCH=marqo" >> $GITHUB_ENV
else
echo "::set-output name=py_marqo_branch::git+https://github.com/marqo-ai/py-marqo.git@${{ env.PY_MQ_API_TEST_BRANCH }}"
echo "MQ_PY_MARQO_BRANCH=git+https://github.com/marqo-ai/py-marqo.git@${{ inputs.py_marqo_branch }}" >> $GITHUB_ENV
fi
env:
PY_MQ_API_TEST_BRANCH: ${{ inputs.py_marqo_branch }}
- name: Checkout marqo-api-tests repo
uses: actions/checkout@v3
Expand All @@ -118,7 +115,6 @@ jobs:
export MQ_API_TEST_BRANCH=$(echo "${GITHUB_REF}" | cut -d'/' -f3-)
CUSTOM_TEST_IMG="${{ github.event.inputs.image_to_test }}"
export MQ_API_TEST_IMG=${CUSTOM_TEST_IMG:-"marqo_docker_0"}
export MQ_PY_MARQO_BRANCH=${{ steps.set_var.outputs.py_marqo_branch }}
tox -e py3-docker_marqo
Stop-Runner:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/cpu_local_marqo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,13 @@ jobs:
pip install flake8
# TODO: linting here
- name: Set py_marqo_branch variable
id: set_var
- name: Set MQ_PY_MARQO_BRANCH variable
run: |
if [[ "${{ env.PY_MQ_API_TEST_BRANCH }}" == "marqo" ]]; then
echo "::set-output name=py_marqo_branch::marqo"
if [[ "${{ inputs.py_marqo_branch }}" == "marqo" ]] || [[ "${{ inputs.py_marqo_branch }}" == "" ]]; then
echo "MQ_PY_MARQO_BRANCH=marqo" >> $GITHUB_ENV
else
echo "::set-output name=py_marqo_branch::git+https://github.com/marqo-ai/py-marqo.git@${{ env.PY_MQ_API_TEST_BRANCH }}"
echo "MQ_PY_MARQO_BRANCH=git+https://github.com/marqo-ai/py-marqo.git@${{ inputs.py_marqo_branch }}" >> $GITHUB_ENV
fi
env:
PY_MQ_API_TEST_BRANCH: ${{ inputs.py_marqo_branch }}
- name: Checkout marqo-api-tests repo
uses: actions/checkout@v3
Expand All @@ -117,7 +114,6 @@ jobs:
export MQ_API_TEST_BRANCH=$(echo "${GITHUB_REF}" | cut -d'/' -f3-)
CUSTOM_TEST_IMG="${{ github.event.inputs.image_to_test }}"
export MQ_API_TEST_IMG=${CUSTOM_TEST_IMG:-"marqo_docker_0"}
export MQ_PY_MARQO_BRANCH=${{ steps.set_var.outputs.py_marqo_branch }}
tox -e py3-local_marqo
Stop-Runner:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/cuda_docker_marqo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,13 @@ jobs:
pip install flake8
# TODO: linting here
- name: Set py_marqo_branch variable
id: set_var
- name: Set MQ_PY_MARQO_BRANCH variable
run: |
if [[ "${{ env.PY_MQ_API_TEST_BRANCH }}" == "marqo" ]]; then
echo "::set-output name=py_marqo_branch::marqo"
if [[ "${{ inputs.py_marqo_branch }}" == "marqo" ]] || [[ "${{ inputs.py_marqo_branch }}" == "" ]]; then
echo "MQ_PY_MARQO_BRANCH=marqo" >> $GITHUB_ENV
else
echo "::set-output name=py_marqo_branch::git+https://github.com/marqo-ai/py-marqo.git@${{ env.PY_MQ_API_TEST_BRANCH }}"
echo "MQ_PY_MARQO_BRANCH=git+https://github.com/marqo-ai/py-marqo.git@${{ inputs.py_marqo_branch }}" >> $GITHUB_ENV
fi
env:
PY_MQ_API_TEST_BRANCH: ${{ inputs.py_marqo_branch }}
- name: Checkout marqo-api-tests repo
uses: actions/checkout@v3
Expand All @@ -119,7 +116,6 @@ jobs:
export MQ_API_TEST_BRANCH=$(echo "${GITHUB_REF}" | cut -d'/' -f3-)
CUSTOM_TEST_IMG="${{ github.event.inputs.image_to_test }}"
export MQ_API_TEST_IMG=${CUSTOM_TEST_IMG:-"marqo_docker_0"}
export MQ_PY_MARQO_BRANCH=${{ steps.set_var.outputs.py_marqo_branch }}
tox -e py3-cuda_docker_marqo
Stop-Runner:
Expand Down

0 comments on commit 2c2ada7

Please sign in to comment.