travis_script.sh 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 ]]; then
  29. # Run the coverage check.
  30. npm run build
  31. npm run build:test
  32. npm run coverage
  33. # Run the link check
  34. pip install -q pytest-check-links
  35. py.test --check-links -k .md .
  36. fi