config.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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-cci:1.0.0
  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. cp -r desktop/core/src /usr/share/hue/desktop/core/src
  41. cp -r desktop/libs /usr/share/hue/desktop/libs
  42. cp -r apps /usr/share/hue/apps
  43. cp -r docs /usr/share/hue/docs
  44. make npm-install
  45. # Run tests
  46. - run:
  47. name: run python API tests
  48. command: |
  49. cd /usr/share/hue
  50. ./build/env/bin/hue test unit --with-xunit --with-cover
  51. - run:
  52. name: run js tests
  53. command: |
  54. cd /usr/share/hue
  55. run npm test
  56. # Code analyses
  57. - run:
  58. name: run js tests
  59. command: |
  60. cd /usr/share/hue
  61. npm run lint-fix
  62. - store_artifacts:
  63. path: test-reports
  64. destination: test-reports