travis_script.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. # Run the link check
  31. pip install -q pytest-check-links
  32. py.test --check-links -k .md .
  33. # Build the docs
  34. npm run docs
  35. cp jupyter-plugins-demo.gif docs
  36. # Verify docs build
  37. pushd tutorial
  38. conda env create -n test_docs -f environment.yml
  39. source activate test_docs
  40. make linkcheck
  41. make html
  42. source deactivate
  43. popd
  44. fi
  45. if [[ $GROUP == examples ]]; then
  46. # Make sure the examples build
  47. npm run build:examples
  48. fi