Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add integration test for package import #218

Merged
merged 3 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions inttests/README.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 19 additions & 0 deletions inttests/test_import.sh
Original file line number Diff line number Diff line change
@@ -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"
Loading