pythonpackage.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: Python package
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ${{ matrix.os }}
  6. strategy:
  7. matrix:
  8. os: [ubuntu-latest, macos-latest, windows-latest]
  9. python-version: [3.5, 3.6, 3.7, 3.8, 3.9, pypy3]
  10. exclude:
  11. # sqlite3 exit handling seems to get in the way
  12. - os: macos-latest
  13. python-version: pypy3
  14. # doesn't support passing in bytestrings to os.scandir
  15. - os: windows-latest
  16. python-version: pypy3
  17. # path encoding
  18. - os: windows-latest
  19. python-version: 3.5
  20. # path encoding
  21. - os: macos-latest
  22. python-version: 3.5
  23. fail-fast: false
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Set up Python ${{ matrix.python-version }}
  27. uses: actions/setup-python@v2
  28. with:
  29. python-version: ${{ matrix.python-version }}
  30. - name: Install native dependencies (Ubuntu)
  31. run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
  32. if: "matrix.os == 'ubuntu-latest'"
  33. - name: Install native dependencies (MacOS)
  34. run: brew install swig gpgme
  35. if: "matrix.os == 'macos-latest'"
  36. - name: Install dependencies
  37. run: |
  38. python -m pip install --upgrade pip
  39. pip install -U pip coverage codecov flake8 fastimport
  40. - name: Install gpg on supported platforms
  41. run: pip install -U gpg
  42. if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"
  43. - name: Install mypy
  44. run: |
  45. pip install -U mypy
  46. python -m mypy --install-types
  47. if: "matrix.python-version != 'pypy3'"
  48. - name: Style checks
  49. run: |
  50. python -m flake8
  51. - name: Typing checks
  52. run: |
  53. python -m mypy dulwich
  54. if: "matrix.python-version != 'pypy3'"
  55. - name: Build
  56. run: |
  57. python setup.py build_ext -i
  58. - name: Coverage test suite run
  59. run: |
  60. python -m coverage run -p -m unittest dulwich.tests.test_suite
  61. - name: Upload coverage details
  62. run: |
  63. codecov