travis_script.sh 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 clean
  12. npm run build:src
  13. npm run build:test
  14. npm test
  15. npm run test:services || npm run test:services
  16. # Make sure we have CSS that can be converted with postcss
  17. npm install -g postcss-cli
  18. postcss jupyterlab/build/*.css > /dev/null
  19. # Run the publish script in jupyterlab
  20. cd jupyterlab
  21. npm run publish
  22. if [ ! -f ./build/release_data.json ]; then
  23. echo "npm publish in jupyterlab unsucessful!"
  24. fi
  25. fi
  26. if [[ $GROUP == coverage_and_docs ]]; then
  27. # Run the coverage and python tests.
  28. py.test
  29. npm run build
  30. npm run build:test
  31. npm run coverage
  32. # Run the link check
  33. pip install -q pytest-check-links
  34. py.test --check-links -k .md .
  35. # Build the api docs
  36. npm run docs
  37. cp jupyter_plugins.png docs
  38. # Verify tutorial docs build
  39. pushd docs
  40. conda env create -n test_docs -f environment.yml
  41. source activate test_docs
  42. make html
  43. source deactivate
  44. popd
  45. fi
  46. if [[ $GROUP == cli ]]; then
  47. # Make sure we can successfully load the core app.
  48. pip install selenium
  49. python -m jupyterlab.selenium_check --core-mode
  50. # Make sure we can build and run the app.
  51. jupyter lab build
  52. python -m jupyterlab.selenium_check
  53. jupyter labextension list
  54. # Test the cli apps.
  55. jupyter lab clean
  56. jupyter lab build
  57. jupyter lab path
  58. jupyter labextension link jupyterlab/tests/mockextension --no-build
  59. jupyter labextension unlink jupyterlab/tests/mockextension --no-build
  60. jupyter labextension link jupyterlab/tests/mockextension --no-build
  61. jupyter labextension unlink @jupyterlab/python-tests --no-build
  62. jupyter labextension install jupyterlab/tests/mockextension --no-build
  63. jupyter labextension list
  64. jupyter labextension uninstall @jupyterlab/python-tests
  65. # Make sure we can call help on all the cli apps.
  66. jupyter lab -h
  67. jupyter lab build -h
  68. jupyter lab clean -h
  69. jupyter lab path -h
  70. jupyter labextension link -h
  71. jupyter labextension unlink -h
  72. jupyter labextension install -h
  73. jupyter labextension uninstall -h
  74. jupyter labextension list -h
  75. fi