From f4e54debb49a3e6f942dce3d9f48a21734c5ad8d Mon Sep 17 00:00:00 2001 From: Bobby Date: Tue, 30 Aug 2022 23:05:20 -0400 Subject: Added Local Test Runner Script --- tests.local.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tests.local.sh diff --git a/tests.local.sh b/tests.local.sh new file mode 100755 index 0000000..bb2c732 --- /dev/null +++ b/tests.local.sh @@ -0,0 +1,34 @@ +# Clean tox environment +tox -e clean + +# Run Tests +tox -e check -v + +# Get the current installed python version +PYTHON_VERSION=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))') + +# Subset the python version to the major.minor version +PYTHON_VERSION=$(echo $PYTHON_VERSION | cut -d. -f1,2) + +if [ "$PYTHON_VERSION" = "3.6" ]; then + # Build using python 3.6 + tox -e py36 -v +elif [ "$PYTHON_VERSION" = "3.7" ]; then + # Build using python 3.7 + tox -e py37 -v +elif [ "$PYTHON_VERSION" = "3.8" ]; then + # Build using python 3.8 + tox -e py38 -v +elif [ "$PYTHON_VERSION" = "3.9" ]; then + # Build using python 3.9 + tox -e py39 -v +elif [ "$PYTHON_VERSION" = "3.10" ]; then + # Build using python 3.10 + tox -e py310 -v +else + # Show error message + echo "Python version $PYTHON_VERSION is not supported" +fi + +# Run Coverage +tox -e report -v -- cgit v1.2.3