release_test.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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}XXXXX)
  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. python -m jupyterlab.browser_check
  14. jupyter lab clean --all
  15. pushd jupyterlab/tests/mock_packages
  16. jupyter labextension install mimeextension --no-build --debug
  17. jupyter labextension develop extension
  18. jupyter labextension build extension
  19. popd
  20. # Install third party widgets - allow to fail
  21. pip install --pre jupyterlab_widgets; true
  22. pushd $TEST_DIR
  23. conda install --override-channels --strict-channel-priority -c conda-forge -c anaconda -y ipywidgets altair matplotlib vega_datasets
  24. jupyter lab build
  25. python -m jupyterlab.browser_check
  26. jupyter lab
  27. # undo our environment changes just in case we are sourcing this script
  28. conda deactivate
  29. popd