travis_script.sh 999 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 build
  20. npm run build:test
  21. npm test
  22. npm run test:services || npm run test:services
  23. # Make sure we have CSS that can be converted with postcss
  24. npm install -g postcss-cli
  25. postcss jupyterlab/build/*.css > /dev/null
  26. fi
  27. if [[ $GROUP == coverage ]]; then
  28. # Run the coverage check.
  29. npm run build
  30. npm run build:test
  31. npm run coverage
  32. # Run the link check
  33. pip install -q pytest-check-links
  34. py.test --check-links -k .md .
  35. fi