3535docker = Collection ("docker" )
3636ns .add_collection (docker )
3737
38+ sanity = Collection ("sanity" )
39+ ns .add_collection (sanity )
40+
3841
3942@task
4043def build_docs (c ):
@@ -59,7 +62,7 @@ def download_latest_aws_docs(c):
5962def build_package (c ):
6063 """Build the policy_sentry package from the current directory contents for use with PyPi"""
6164 c .run ("python -m pip install --upgrade setuptools wheel" )
62- c .run ("python setup.py -q sdist bdist_wheel" )
65+ c .run ("python setup.py sdist bdist_wheel" )
6366
6467
6568@task (pre = [build_package ])
@@ -306,6 +309,21 @@ def build_docker(c):
306309 c .run ("docker build -t kmcquade/policy_sentry ." )
307310
308311
312+ # Sanity checks
313+ @task (post = [uninstall_package ])
314+ def validate_wheel (c ):
315+ """Validate the wheel can be installed and works properly"""
316+ c .run ("pip3 install dist/policy_sentry-*.whl" )
317+ c .run ("policy_sentry query service-table --fmt csv" , pty = True )
318+
319+
320+ @task (post = [uninstall_package ])
321+ def validate_sdist (c ):
322+ """Validate the sdist archive can be installed and works properly"""
323+ c .run ("pip3 install dist/policy_sentry-*.tar.gz" )
324+ c .run ("policy_sentry query service-table --fmt csv" , pty = True )
325+
326+
309327# Add all testing tasks to the test collection
310328integration .add_task (clean_config_directory , "clean" )
311329integration .add_task (version_check , "version" )
@@ -331,3 +349,6 @@ def build_docker(c):
331349build .add_task (upload_to_pypi_prod_server , "upload-prod" )
332350
333351docker .add_task (build_docker , "build-docker" )
352+
353+ sanity .add_task (validate_wheel , "validate-wheel" )
354+ sanity .add_task (validate_sdist , "validate-sdist" )
0 commit comments