travis_script.sh 3.1 KB

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