Unit test Galaxy packages during CI.

All the same unit tests run in the context of a full Galaxy but this will ensure the tests also run with their dependencies as would be configured via pip-installed variants. This will catch dependency problems and ensure the package dependency structure remains correct.
This commit is contained in:
John Chilton
2019-06-05 16:44:34 -04:00
parent 20bdd5867a
commit 0a95f68f59
2 changed files with 36 additions and 0 deletions
+9
View File
@@ -154,6 +154,13 @@ jobs:
- run: sudo apt-get install -y libxml2-utils
- *install_tox
- run: tox -e validate_test_tools
test_galaxy_packages:
docker:
- image: circleci/python:2.7.15
<<: *set_workdir
steps:
- *restore_repo_cache
- run: sh packages/test.sh
check_py3_compatibility:
docker:
- image: circleci/python:2.7.15
@@ -202,6 +209,8 @@ workflows:
<<: *requires_get_code
- py35_first_startup:
<<: *requires_get_code
- test_galaxy_packages:
<<: *requires_get_code
- validate_test_tools:
<<: *requires_get_code
- check_py3_compatibility:
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
set -e
# Change to packages directory.
cd "$(dirname "$0")"
TEST_PYTHON=${TEST_PYTHON:-"python"}
TEST_ENV_DIR=${TEST_ENV_DIR:-`mktemp -d -t gxpkgtestenvXXXXXX`}
virtualenv -p "$TEST_PYTHON" "$TEST_ENV_DIR"
. "${TEST_ENV_DIR}/bin/activate"
pip install pytest
# ensure ordered by dependency dag
PACKAGE_DIRS="
util
objectstore
data
"
for package_dir in $PACKAGE_DIRS; do
cd "$package_dir"
python setup.py install
pytest --doctest-modules galaxy tests
cd ..
done