release_test.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env bash
  2. # Test a release wheel in a fresh conda environment with and without installed
  3. # extensions
  4. # initialize the shell
  5. set -ex
  6. . $(conda info --base)/etc/profile.d/conda.sh
  7. JLAB_TEST_ENV="${CONDA_DEFAULT_ENV}_test"
  8. TEST_DIR=$(mktemp -d -t $JLAB_TEST_ENV)
  9. conda create --override-channels --strict-channel-priority -c conda-forge -c anaconda -y -n "$JLAB_TEST_ENV" notebook nodejs twine
  10. conda activate "$JLAB_TEST_ENV"
  11. pip install dist/*.whl
  12. cp examples/notebooks/*.ipynb $TEST_DIR/
  13. pushd $TEST_DIR
  14. python -m jupyterlab.browser_check
  15. jupyter labextension install @jupyterlab/fasta-extension --no-build
  16. jupyter labextension install @jupyterlab/geojson-extension --no-build
  17. jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
  18. jupyter labextension install bqplot --no-build
  19. jupyter labextension install jupyter-leaflet --no-build
  20. jupyter lab clean
  21. conda install --override-channels --strict-channel-priority -c conda-forge -c anaconda -y ipywidgets altair matplotlib vega_datasets
  22. jupyter lab build && python -m jupyterlab.browser_check && jupyter lab
  23. # undo our environment changes just in case we are sourcing this script
  24. conda deactivate
  25. popd