release_test.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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 @jupyterlab/plotly-extension --no-build
  18. jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
  19. jupyter labextension install bqplot --no-build
  20. jupyter labextension install jupyter-leaflet --no-build
  21. jupyter lab clean
  22. conda install --override-channels --strict-channel-priority -c conda-forge -c anaconda -y ipywidgets altair matplotlib vega_datasets
  23. jupyter lab build && python -m jupyterlab.browser_check && jupyter lab
  24. # undo our environment changes just in case we are sourcing this script
  25. conda deactivate
  26. popd