github.com/weaviate/weaviate@v1.24.6/test/acceptance_with_python/run.sh (about) 1 #!/usr/bin/env bash 2 3 set -euo pipefail 4 5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 6 7 # Check if Python is installed 8 if ! command -v python3 &>/dev/null; then 9 echo "Python is not installed. Please install Python and try again." 10 exit 1 11 fi 12 13 # Check if a virtual environment (venv) exists 14 if [ ! -d "venv" ]; then 15 echo "Creating a new virtual environment (venv)..." 16 python3 -m venv .venv 17 fi 18 19 # Activate the virtual environment 20 source .venv/bin/activate 21 22 cd "$SCRIPT_DIR" || return 23 24 pip install --upgrade pip --quiet 25 pip install -r requirements.txt --quiet 26 27 # run python tests in parallel 28 pytest -n auto .