2
0

pythontest.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Python tests
  2. on:
  3. push:
  4. pull_request:
  5. schedule:
  6. - cron: "0 6 * * *" # Daily 6AM UTC build
  7. jobs:
  8. test:
  9. runs-on: ${{ matrix.os }}
  10. strategy:
  11. matrix:
  12. os: [ubuntu-latest, macos-latest, windows-latest]
  13. python-version:
  14. ["3.7", "3.8", "3.9", "3.10", "3.11"]
  15. fail-fast: false
  16. steps:
  17. - uses: actions/checkout@v2
  18. - name: Set up Python ${{ matrix.python-version }}
  19. uses: actions/setup-python@v2
  20. with:
  21. python-version: ${{ matrix.python-version }}
  22. - name: Install native dependencies (Ubuntu)
  23. run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
  24. if: "matrix.os == 'ubuntu-latest'"
  25. - name: Install native dependencies (MacOS)
  26. run: brew install swig gpgme
  27. if: "matrix.os == 'macos-latest'"
  28. - name: Install dependencies
  29. run: |
  30. python -m pip install --upgrade pip
  31. pip install -U pip coverage flake8 fastimport paramiko urllib3
  32. - name: Install gpg on supported platforms
  33. run: pip install -U gpg
  34. if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"
  35. - name: Install mypy
  36. run: |
  37. pip install -U mypy types-paramiko types-requests
  38. if: "matrix.python-version != 'pypy3'"
  39. - name: Style checks
  40. run: |
  41. python -m flake8
  42. - name: Typing checks
  43. run: |
  44. python -m mypy dulwich
  45. if: "matrix.python-version != 'pypy3'"
  46. - name: Build
  47. run: |
  48. python setup.py build_ext -i
  49. - name: Coverage test suite run
  50. run: |
  51. python -m coverage run -p -m unittest dulwich.tests.test_suite