commitflow-py3.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Python 3 CI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. branches:
  8. - master
  9. jobs:
  10. build:
  11. runs-on: ubuntu-20.04
  12. strategy:
  13. matrix:
  14. python-version: [3.8]
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v2
  18. with:
  19. fetch-depth: 0
  20. - name: Set up Python ${{ matrix.python-version }}
  21. uses: actions/setup-python@v2
  22. with:
  23. python-version: ${{ matrix.python-version }}
  24. - name: Cache pip
  25. uses: actions/cache@v2
  26. with:
  27. # This path is specific to Ubuntu
  28. path: ~/.cache/pip
  29. key: ${{ runner.os }}-pip-${{ hashFiles('desktop/core/requirements.txt') }}
  30. restore-keys: |
  31. ${{ runner.os }}-pip-
  32. ${{ runner.os }}-
  33. - name: compile
  34. run: |
  35. sudo apt-get update
  36. sudo apt-get install -y gcc g++ build-essential python3.8-dev python3.8-venv python3.8-distutils asciidoc rsync curl sudo libkrb5-dev libldap2-dev libsasl2-dev libxml2-dev libxslt-dev libsasl2-modules-gssapi-mit libsnappy-dev libffi-dev # This should not be needed as some point
  37. sudo curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - && sudo apt-get install -y nodejs
  38. sudo curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python3.8
  39. sudo apt-get install -y python3-setuptools
  40. sudo apt-get install -y libncursesw5-dev libgdbm-dev libc6-dev libssl-dev openssl
  41. export PYTHON_VER=python3.8
  42. export ROOT=$PWD
  43. make apps
  44. - name: run python lints
  45. run: |
  46. ./build/env/bin/pip install pylint==2.5.3 pylint-django==2.3.0 configparser==5.3.0
  47. ./tools/ci/check_for_python_lint.sh
  48. - name: run tests
  49. run: |
  50. PYTHONWARNINGS=always ./build/env/bin/hue test unit --with-xunit --with-cover