travis_script.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. if [[ $GROUP == base ]]; then
  9. # Test against a clean npm build
  10. npm run clean
  11. npm run build:all
  12. npm test
  13. # Run the python tests
  14. pushd jupyterlab
  15. nosetests
  16. popd
  17. fi
  18. if [[ $GROUP == misc ]]; then
  19. # Run the coverage check.
  20. npm run test:coverage
  21. # Make sure we have CSS that can be converted with postcss
  22. npm install -g postcss-cli
  23. postcss jupyterlab/build/*.css > /dev/null
  24. # Make sure we can start and kill the lab server
  25. jupyter lab --no-browser &
  26. TASK_PID=$!
  27. # Make sure the task is running
  28. ps -p $TASK_PID || exit 1
  29. sleep 5
  30. kill $TASK_PID
  31. wait $TASK_PID
  32. # Build the docs
  33. npm run docs
  34. cp jupyter-plugins-demo.gif docs
  35. # Verify docs build
  36. pushd tutorial
  37. conda env create -n test_docs -f environment.yml
  38. source activate test_docs
  39. make linkcheck
  40. make html
  41. source deactivate
  42. popd
  43. fi
  44. if [[ $GROUP == examples ]]; then
  45. # Make sure the examples build
  46. npm run build:examples
  47. fi