travis_script.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. npm test || npm test
  14. npm run test:coverage || npm run test:coverage
  15. # Run the python tests
  16. npm run build:serverextension
  17. python setup.py build
  18. pushd jupyterlab
  19. nosetests
  20. popd
  21. npm run build:examples
  22. npm run docs
  23. cp jupyter-plugins-demo.gif docs
  24. # Make sure we have CSS that can be converted with postcss
  25. npm install -g postcss-cli
  26. postcss jupyterlab/build/*.css > /dev/null
  27. # Verify docs build
  28. pushd tutorial
  29. conda env create -n test_docs -f environment.yml
  30. source activate test_docs
  31. make linkcheck
  32. make html
  33. source deactivate
  34. popd
  35. # Make sure we can start and kill the lab server
  36. jupyter lab --no-browser &
  37. TASK_PID=$!
  38. # Make sure the task is running
  39. ps -p $TASK_PID || exit 1
  40. sleep 5
  41. kill $TASK_PID
  42. wait $TASK_PID