travis_script.sh 879 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. # Run the JS and python tests
  10. npm test
  11. py.test
  12. # Make sure we have CSS that can be converted with postcss
  13. npm install -g postcss-cli
  14. postcss jupyterlab/build/*.css > /dev/null
  15. # Make sure we can start and kill the lab server
  16. jupyter lab --no-browser &
  17. TASK_PID=$!
  18. # Make sure the task is running
  19. ps -p $TASK_PID || exit 1
  20. sleep 5
  21. kill $TASK_PID
  22. wait $TASK_PID
  23. fi
  24. if [[ $GROUP == coverage_and_docs ]]; then
  25. # Run the coverage check.
  26. npm run test:coverage
  27. # Run the link check
  28. pip install -q pytest-check-links
  29. py.test --check-links -k .md .
  30. fi