travis_script.sh 901 B

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