commitflow.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. name: Python 2 CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. branches:
  8. - master
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. container: gethue/hue:latest-py2
  13. strategy:
  14. matrix:
  15. python-version: [2.7]
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v2
  19. - name: Set up Python ${{ matrix.python-version }}
  20. uses: actions/setup-python@v2
  21. with:
  22. python-version: ${{ matrix.python-version }}
  23. - name: refresh sources
  24. run: |
  25. pwd
  26. rm -r /usr/share/hue/desktop/core/src/desktop
  27. cp -r desktop/core/src/desktop /usr/share/hue/desktop/core/src/desktop
  28. for lib in `ls desktop/libs`
  29. do
  30. rm -r /usr/share/hue/desktop/libs/$lib/src/$lib
  31. cp -r desktop/libs/$lib/src/$lib /usr/share/hue/desktop/libs/$lib/src/$lib
  32. done
  33. for lib in `ls apps | grep -v Makefile`
  34. do
  35. rm -r /usr/share/hue/apps/$lib/src/$lib
  36. cp -r apps/$lib/src/$lib /usr/share/hue/apps/$lib/src/$lib
  37. done
  38. rm -r /usr/share/hue/tools
  39. cp -r tools /usr/share/hue
  40. rm /usr/share/hue/desktop/conf/*.ini
  41. cp desktop/conf/pseudo-distributed.ini.tmpl /usr/share/hue/desktop/conf/pseudo-distributed.ini
  42. # ini configuration tweaks
  43. ## Very slow if on, cuts time in two and does not skip tests
  44. sed -i 's/## has_iam_detection=true/ has_iam_detection=false/g' /usr/share/hue/desktop/conf/pseudo-distributed.ini
  45. # make npm-install # Not available
  46. cp babel.config.js /usr/share/hue
  47. cp tsconfig.json /usr/share/hue
  48. cp jest.config.js /usr/share/hue
  49. cp .pylintrc /usr/share/hue
  50. cp .stylelintrc /usr/share/hue
  51. cp webpack.config*.js /usr/share/hue
  52. rm /usr/share/hue/package.json
  53. cp package.json /usr/share/hue
  54. rm /usr/share/hue/package-lock.json
  55. cp package-lock.json /usr/share/hue
  56. cp -r docs /usr/share/hue
  57. cd /usr/share/hue
  58. npm install
  59. npm run webpack
  60. npm run webpack-login
  61. npm run webpack-workers
  62. ./build/env/bin/hue collectstatic --noinput
  63. # - name: run documentation lints
  64. # run: |
  65. # cd $GITHUB_WORKSPACE
  66. # # Installs to move to image building
  67. # curl -O https://dl.google.com/go/go1.15.linux-amd64.tar.gz
  68. # tar -xvf go1.15.linux-amd64.tar.gz
  69. # export GO111MODULE=on
  70. # go/bin/go get -u github.com/raviqqe/muffet@v1.5.7
  71. # curl --output hugo_0.69.0_Linux-64bit.tar.gz -L https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_0.69.0_Linux-64bit.tar.gz
  72. # tar -xvf hugo_0.69.0_Linux-64bit.tar.gz
  73. # export PATH=$PWD:$HOME/go/bin:$PATH
  74. # # Trigger linting if documentation changes
  75. # ./tools/ci/check_for_website_dead_links.sh docs/docs-site
  76. # # ./tools/ci/check_for_website_dead_links.sh docs/gethue
  77. # Run code lints
  78. # - name: run python lints
  79. # run: |
  80. # cd $GITHUB_WORKSPACE
  81. # /usr/share/hue/build/env/bin/pip install pylint==1.7.5 pylint-django==0.7.2 configparser==4.0.2
  82. # ./tools/ci/check_for_python_lint.sh /usr/share/hue
  83. # Run tests
  84. - name: run python API tests
  85. run: |
  86. cd /usr/share/hue
  87. PYTHONWARNINGS=always ./build/env/bin/hue test unit --with-xunit --with-cover