2
0

pythontest.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 ".[fastimport,paramiko,https]"
  32. - name: Install gpg on supported platforms
  33. run: pip install -U ".[pgp]"
  34. if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"
  35. - name: Style checks
  36. run: |
  37. pip install -U flake8
  38. python -m flake8
  39. - name: Typing checks
  40. run: |
  41. pip install -U mypy types-paramiko types-requests
  42. python -m mypy dulwich
  43. if: "matrix.python-version != 'pypy3'"
  44. - name: Build
  45. run: |
  46. python setup.py build_ext -i
  47. - name: Coverage test suite run
  48. run: |
  49. pip install -U coverage
  50. python -m coverage run -p -m unittest dulwich.tests.test_suite