travis_script.sh 1.2 KB

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