travis_script.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. # Run the publish script in jupyterlab
  27. cd jupyterlab
  28. npm run publish
  29. if [ ! -f ./build/release_data.json ]; then
  30. echo "npm publish in jupyterlab unsucessful!"
  31. fi
  32. fi
  33. if [[ $GROUP == coverage_and_docs ]]; then
  34. # Run the coverage and python tests.
  35. py.test
  36. npm run build
  37. npm run build:test
  38. npm run coverage
  39. # Run the link check
  40. pip install -q pytest-check-links
  41. py.test --check-links -k .md .
  42. # Build the api docs
  43. npm run docs
  44. cp jupyter_plugins.png docs
  45. # Verify tutorial docs build
  46. pushd docs
  47. conda env create -n test_docs -f environment.yml
  48. source activate test_docs
  49. make html
  50. source deactivate
  51. popd
  52. fi