Skip to content

Commit

Permalink
Update open-source-unit-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pandu-k authored Aug 1, 2023
1 parent e50f965 commit 5b4eb7e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/open-source-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,17 @@ jobs:
- name: Run Py-Marqo Tests
run: |
docker pull ${{ steps.prepare.outputs.registry }}/${{ steps.prepare.outputs.image_repo }}:${{ steps.prepare.outputs.image_tag }}
docker run --name marqo -t --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway \
docker run --name marqo -d --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway \
${{ steps.prepare.outputs.registry }}/${{ steps.prepare.outputs.image_repo }}:${{ steps.prepare.outputs.image_tag }}
LOGS_PID=$(docker logs -f marqo & echo $!) # capture the pid of `docker logs` command
# wait for marqo to start with timeout of 10 minutes
timeout 10m bash -c 'until [[ $(curl -v --silent --insecure http://localhost:8882 2>&1 | grep Marqo) ]]; do sleep 0.1; done;' || (echo "Marqo did not start in time" && exit 1)

# Kill the `docker logs` command (so subprocess does not wait for it)
kill $LOGS_PID || true

python -m pip install --upgrade pip
pip install tox
tox
Expand Down

0 comments on commit 5b4eb7e

Please sign in to comment.