diff --git a/inttests/README.md b/inttests/README.md new file mode 100644 index 00000000..7169a998 --- /dev/null +++ b/inttests/README.md @@ -0,0 +1,6 @@ +This directory holds all integration tests. The tests are mainly to be run by +CI, but can also be run manually. + +The main reason for having integration tests is to make sure that the package +can be imported and used as intended, something that can't be verified with +unit-tests alone. diff --git a/inttests/test_import.sh b/inttests/test_import.sh new file mode 100755 index 00000000..7f5a9fbe --- /dev/null +++ b/inttests/test_import.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# XXX: must be run with lowest required python version (as specified in +# pyproject.toml), to ensure compatibility + +set -ex + +[[ "$(python --version)" == "Python 3.8."* ]] + +repo=$(dirname $(realpath $0))/.. +url="git+file://$repo" +dir=$(mktemp -d) + +cd $dir +python -m venv .env +source .env/bin/activate + +pip install $url +python -c "from odm_validation.validation import validate_data"