travis_script.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 successfully load the core app.
  10. pip install selenium
  11. python -m jupyterlab.selenium_check --core-mode
  12. # Make sure we can build and run the app.
  13. jupyter lab build
  14. python -m jupyterlab.selenium_check
  15. jupyter labextension list
  16. # Run the JS and python tests
  17. py.test
  18. npm run clean
  19. npm run build:src
  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_and_docs ]]; then
  28. # Run the coverage and python tests.
  29. py.test
  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. # Build the api docs
  37. npm run docs
  38. cp jupyter_plugins.png docs
  39. # Verify tutorial docs build
  40. pushd docs
  41. conda env create -n test_docs -f environment.yml
  42. source activate test_docs
  43. make html
  44. source deactivate
  45. popd
  46. fi