config.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Python CircleCI 2.0 configuration file
  2. #
  3. # Check https://circleci.com/docs/2.0/language-python/ for more details
  4. #
  5. version: 2
  6. jobs:
  7. build:
  8. docker:
  9. # specify the version you desire here
  10. # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
  11. # - image: circleci/python:3.6.1
  12. - image: gethue/hue:latest
  13. # Specify service dependencies here if necessary
  14. # CircleCI maintains a library of pre-built images
  15. # documented at https://circleci.com/docs/2.0/circleci-images/
  16. # - image: circleci/postgres:9.4
  17. working_directory: ~/repo
  18. steps:
  19. - checkout
  20. # Download and cache dependencies
  21. # - restore_cache:
  22. # keys:
  23. # - v1-dependencies-{{ checksum "requirements.txt" }}
  24. # # fallback to using the latest cache if no exact match is found
  25. # - v1-dependencies-
  26. # - run:
  27. # name: install dependencies
  28. # command: |
  29. # python -m venv venv
  30. # . venv/bin/activate
  31. # pip install -r requirements.txt
  32. # - save_cache:
  33. # paths:
  34. # - ./venv
  35. # key: v1-dependencies-{{ checksum "requirements.txt" }}
  36. # Revert to traditional pip install when build refactored, in the meantime:
  37. - run:
  38. name: refresh sources
  39. command: |
  40. rm -r /usr/share/hue/desktop/core/src/desktop
  41. cp -r desktop/core/src/desktop /usr/share/hue/desktop/core/src/desktop
  42. for lib in `ls desktop/libs`
  43. do
  44. rm -r /usr/share/hue/desktop/libs/$lib/src/$lib
  45. cp -r desktop/libs/$lib/src/$lib /usr/share/hue/desktop/libs/$lib/src/$lib
  46. done
  47. for lib in `ls apps | grep -v Makefile`
  48. do
  49. rm -r /usr/share/hue/apps/$lib/src/$lib
  50. cp -r apps/$lib/src/$lib /usr/share/hue/apps/$lib/src/$lib
  51. done
  52. # cp -r docs /usr/share/hue/docs
  53. rm /usr/share/hue/desktop/conf/*.ini
  54. cp desktop/conf/pseudo-distributed.ini.tmpl /usr/share/hue/desktop/conf/pseudo-distributed.ini
  55. cd /usr/share/hue
  56. # make npm-install # Not available
  57. npm install
  58. npm run webpack
  59. npm run webpack-login
  60. npm run webpack-workers
  61. ./build/env/bin/hue collectstatic --noinput
  62. # make doc
  63. # hugo --source docs/docs-site
  64. # Run tests
  65. - run:
  66. name: run python API tests
  67. command: |
  68. cd /usr/share/hue
  69. ./build/env/bin/hue test unit --with-xunit --with-cover
  70. - run:
  71. name: run js tests
  72. command: |
  73. cd /usr/share/hue
  74. run npm test
  75. # Code analyses
  76. - run:
  77. name: run js tests
  78. command: |
  79. cd /usr/share/hue
  80. npm run lint-fix
  81. - store_artifacts:
  82. path: test-reports
  83. destination: test-reports