travis_script.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. # Make sure we can start and kill the lab server
  10. jupyter lab --no-browser &
  11. TASK_PID=$!
  12. # Make sure the task is running
  13. ps -p $TASK_PID || exit 1
  14. sleep 5
  15. kill $TASK_PID
  16. wait $TASK_PID
  17. # Run the JS and python tests
  18. py.test
  19. npm run clean
  20. npm run build:src
  21. npm run build:test
  22. npm test
  23. npm run test:services || npm run test:services
  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. fi
  28. if [[ $GROUP == coverage_and_docs ]]; then
  29. # Run the coverage and python tests.
  30. py.test
  31. npm run build
  32. npm run build:test
  33. npm run coverage
  34. # Run the link check
  35. pip install -q pytest-check-links
  36. py.test --check-links -k .md .
  37. # Build the api docs
  38. npm run docs
  39. cp jupyter_plugins.png docs
  40. # Verify tutorial docs build
  41. pushd tutorial
  42. conda env create -n test_docs -f environment.yml
  43. source activate test_docs
  44. make html
  45. source deactivate
  46. popd
  47. fi