2
0

pythontest.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-rc - 3.11", pypy3]
  15. exclude:
  16. # sqlite3 exit handling seems to get in the way
  17. - os: macos-latest
  18. python-version: pypy3
  19. # doesn't support passing in bytestrings to os.scandir
  20. - os: windows-latest
  21. python-version: pypy3
  22. fail-fast: false
  23. steps:
  24. - uses: actions/checkout@v2
  25. - name: Set up Python ${{ matrix.python-version }}
  26. uses: actions/setup-python@v2
  27. with:
  28. python-version: ${{ matrix.python-version }}
  29. - name: Install native dependencies (Ubuntu)
  30. run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
  31. if: "matrix.os == 'ubuntu-latest'"
  32. - name: Install native dependencies (MacOS)
  33. run: brew install swig gpgme
  34. if: "matrix.os == 'macos-latest'"
  35. - name: Install dependencies
  36. run: |
  37. python -m pip install --upgrade pip
  38. pip install -U pip coverage flake8 fastimport paramiko urllib3
  39. - name: Install gpg on supported platforms
  40. run: pip install -U gpg
  41. if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"
  42. - name: Install mypy
  43. run: |
  44. pip install -U mypy types-paramiko types-requests
  45. if: "matrix.python-version != 'pypy3'"
  46. - name: Style checks
  47. run: |
  48. python -m flake8
  49. - name: Typing checks
  50. run: |
  51. python -m mypy dulwich
  52. if: "matrix.python-version != 'pypy3'"
  53. - name: Build
  54. run: |
  55. python setup.py build_ext -i
  56. - name: Coverage test suite run
  57. run: |
  58. python -m coverage run -p -m unittest dulwich.tests.test_suite