travis_script.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. # Copyright (c) Jupyter Development Team.
  3. # Distributed under the terms of the Modified BSD License.
  4. set -ex
  5. export DISPLAY=:99.0
  6. sh -e /etc/init.d/xvfb start || true
  7. export PATH="$HOME/miniconda/bin:$PATH"
  8. # Install and enable the server extension
  9. pip install -v .
  10. jupyter serverextension enable --py jupyterlab
  11. npm run clean
  12. npm run build
  13. if [[ $GROUP == unit ]]; then
  14. npm run test:chrome
  15. # Run the python tests
  16. npm run build:serverextension
  17. python setup.py build
  18. pushd jupyterlab
  19. nosetests
  20. popd
  21. fi
  22. if [[ $GROUP == coverage ]]; then
  23. npm run test:coverage
  24. fi
  25. if [[ $GROUP == misc ]]; then
  26. npm run build:examples
  27. npm run docs
  28. cp jupyter-plugins-demo.gif docs
  29. # Make sure we have CSS that can be converted with postcss
  30. npm install -g postcss-cli
  31. postcss jupyterlab/build/*.css > /dev/null
  32. # Verify docs build
  33. pushd tutorial
  34. conda env create -n test_docs -f environment.yml
  35. source activate test_docs
  36. make linkcheck
  37. make html
  38. source deactivate
  39. popd
  40. # Make sure we can start and kill the lab server
  41. jupyter lab --no-browser &
  42. TASK_PID=$!
  43. # Make sure the task is running
  44. ps -p $TASK_PID || exit 1
  45. sleep 5
  46. kill $TASK_PID
  47. wait $TASK_PID
  48. fi