| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- name: Python 2 CI
- on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
- jobs:
- build:
- runs-on: ubuntu-latest
- container: gethue/hue:latest-py2
- strategy:
- matrix:
- python-version: [2.7]
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python-version }}
- - name: refresh sources
- run: |
- pwd
- rm -r /usr/share/hue/desktop/core/src/desktop
- cp -r desktop/core/src/desktop /usr/share/hue/desktop/core/src/desktop
- for lib in `ls desktop/libs`
- do
- rm -r /usr/share/hue/desktop/libs/$lib/src/$lib
- cp -r desktop/libs/$lib/src/$lib /usr/share/hue/desktop/libs/$lib/src/$lib
- done
- for lib in `ls apps | grep -v Makefile`
- do
- rm -r /usr/share/hue/apps/$lib/src/$lib
- cp -r apps/$lib/src/$lib /usr/share/hue/apps/$lib/src/$lib
- done
- rm -r /usr/share/hue/tools
- cp -r tools /usr/share/hue
- rm /usr/share/hue/desktop/conf/*.ini
- cp desktop/conf/pseudo-distributed.ini.tmpl /usr/share/hue/desktop/conf/pseudo-distributed.ini
- # ini configuration tweaks
- ## Very slow if on, cuts time in two and does not skip tests
- sed -i 's/## has_iam_detection=true/ has_iam_detection=false/g' /usr/share/hue/desktop/conf/pseudo-distributed.ini
- # make npm-install # Not available
- cp babel.config.js /usr/share/hue
- cp tsconfig.json /usr/share/hue
- cp jest.config.js /usr/share/hue
- cp .pylintrc /usr/share/hue
- cp .stylelintrc /usr/share/hue
- cp webpack.config*.js /usr/share/hue
- rm /usr/share/hue/package.json
- cp package.json /usr/share/hue
- rm /usr/share/hue/package-lock.json
- cp package-lock.json /usr/share/hue
- cp -r docs /usr/share/hue
- cd /usr/share/hue
- npm install
- npm run webpack
- npm run webpack-login
- npm run webpack-workers
- ./build/env/bin/hue collectstatic --noinput
- # - name: run documentation lints
- # run: |
- # cd $GITHUB_WORKSPACE
- # # Installs to move to image building
- # curl -O https://dl.google.com/go/go1.15.linux-amd64.tar.gz
- # tar -xvf go1.15.linux-amd64.tar.gz
- # export GO111MODULE=on
- # go/bin/go get -u github.com/raviqqe/muffet@v1.5.7
- # 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
- # tar -xvf hugo_0.69.0_Linux-64bit.tar.gz
- # export PATH=$PWD:$HOME/go/bin:$PATH
- # # Trigger linting if documentation changes
- # ./tools/ci/check_for_website_dead_links.sh docs/docs-site
- # # ./tools/ci/check_for_website_dead_links.sh docs/gethue
- # Run code lints
- # - name: run python lints
- # run: |
- # cd $GITHUB_WORKSPACE
- # /usr/share/hue/build/env/bin/pip install pylint==1.7.5 pylint-django==0.7.2 configparser==4.0.2
- # ./tools/ci/check_for_python_lint.sh /usr/share/hue
- # Run tests
- - name: run python API tests
- run: |
- cd /usr/share/hue
- PYTHONWARNINGS=always ./build/env/bin/hue test unit --with-xunit --with-cover
|