travis_script.sh 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 run build:test
  13. npm test
  14. npm run test:services || npm run test:services
  15. fi
  16. if [[ $GROUP == coverage ]]; then
  17. # Run the coverage and python tests.
  18. py.test
  19. npm run build
  20. npm run build:test
  21. npm run coverage
  22. npm run clean
  23. fi
  24. if [[ $GROUP == other ]]; then
  25. # Make sure we can successfully load the core app.
  26. pip install selenium
  27. python -m jupyterlab.selenium_check --core-mode
  28. # Make sure we can run the built app.
  29. jupyter lab build
  30. python -m jupyterlab.selenium_check
  31. jupyter labextension list
  32. # Make sure we can non-dev install.
  33. conda create -n test_install notebook python=3.5
  34. source activate test_install
  35. pip install .
  36. jupyter lab build
  37. pip install selenium
  38. python -m jupyterlab.selenium_check
  39. source deactivate
  40. # Test the cli apps.
  41. jupyter lab clean
  42. jupyter lab build
  43. jupyter lab path
  44. jupyter labextension link jupyterlab/tests/mockextension --no-build
  45. jupyter labextension unlink jupyterlab/tests/mockextension --no-build
  46. jupyter labextension link jupyterlab/tests/mockextension --no-build
  47. jupyter labextension unlink @jupyterlab/python-tests --no-build
  48. jupyter labextension install jupyterlab/tests/mockextension --no-build
  49. jupyter labextension list
  50. jupyter labextension disable @jupyterlab/python-tests
  51. jupyter labextension enable @jupyterlab/python-tests
  52. jupyter labextension disable @jupyterlab/notebook-extension
  53. jupyter labextension uninstall @jupyterlab/python-tests --no-build
  54. jupyter labextension uninstall @jupyterlab/notebook-extension --no-build
  55. # Make sure we can call help on all the cli apps.
  56. jupyter lab -h
  57. jupyter lab build -h
  58. jupyter lab clean -h
  59. jupyter lab path -h
  60. jupyter labextension link -h
  61. jupyter labextension unlink -h
  62. jupyter labextension install -h
  63. jupyter labextension uninstall -h
  64. jupyter labextension list -h
  65. jupyter labextension enable -h
  66. jupyter labextension disable -h
  67. # Run the package integrity check
  68. npm run integrity
  69. # Make sure the examples build
  70. npm run build:examples
  71. # Run the link check
  72. pip install -q pytest-check-links
  73. py.test --check-links -k .md .
  74. # Build the api docs
  75. npm run docs
  76. cp jupyter_plugins.png docs
  77. # Verify tutorial docs build
  78. pushd docs
  79. conda env create -n test_docs -f environment.yml
  80. source activate test_docs
  81. make html
  82. source deactivate
  83. popd
  84. # Make sure we have CSS that can be converted with postcss
  85. npm install -g postcss-cli
  86. postcss packages/**/style/*.css --dir /tmp
  87. # Make sure we can make release assets
  88. npm run build:static
  89. if [ ! -f ./build/release_data.json ]; then
  90. echo "npm publish in jupyterlab unsucessful!"
  91. fi
  92. python setup.py sdist
  93. python setup.py bdist_wheel --universal
  94. fi