travis_script.sh 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. # Run the package integrity check
  24. npm run integrity
  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. pushd jupyterlab/tests/mock_packages
  45. jupyter labextension link extension --no-build
  46. jupyter labextension unlink extension --no-build
  47. jupyter labextension link extension --no-build
  48. jupyter labextension unlink @jupyterlab/python-tests --no-build
  49. jupyter labextension install extension --no-build
  50. jupyter labextension list
  51. jupyter labextension disable @jupyterlab/python-tests
  52. jupyter labextension enable @jupyterlab/python-tests
  53. jupyter labextension disable @jupyterlab/notebook-extension
  54. jupyter labextension uninstall @jupyterlab/python-tests --no-build
  55. jupyter labextension uninstall @jupyterlab/notebook-extension --no-build
  56. popd
  57. # Make sure we can call help on all the cli apps.
  58. jupyter lab -h
  59. jupyter lab build -h
  60. jupyter lab clean -h
  61. jupyter lab path -h
  62. jupyter labextension link -h
  63. jupyter labextension unlink -h
  64. jupyter labextension install -h
  65. jupyter labextension uninstall -h
  66. jupyter labextension list -h
  67. jupyter labextension enable -h
  68. jupyter labextension disable -h
  69. # Make sure the examples build
  70. npm run build:examples
  71. # Run the link check - allow for a link to fail once
  72. pip install -q pytest-check-links
  73. py.test --check-links -k .md . || 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 add and remove a sibling package.
  88. npm run add:sibling jupyterlab/tests/mock_packages/extension
  89. npm run build
  90. npm run remove:package extension
  91. npm run build
  92. npm run integrity
  93. # Test cli tools
  94. npm run get:dependency mocha
  95. npm run update:dependency mocha
  96. npm run remove:dependency mocha
  97. npm run get:dependency @jupyterlab/buildutils
  98. npm run get:dependency typescript
  99. npm run get:dependency react-native
  100. # Make sure we can make release assets
  101. npm run build:static
  102. if [ ! -f ./build/release_data.json ]; then
  103. echo "npm publish in jupyterlab unsucessful!"
  104. fi
  105. fi