travis_script.sh 3.6 KB

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