pythonpackage.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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, 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. fail-fast: false
  21. steps:
  22. - uses: actions/checkout@v2
  23. - name: Set up Python ${{ matrix.python-version }}
  24. uses: actions/setup-python@v2
  25. with:
  26. python-version: ${{ matrix.python-version }}
  27. - name: Install dependencies
  28. run: |
  29. python -m pip install --upgrade pip
  30. pip install -U pip coverage codecov flake8 fastimport
  31. - name: Install mypy
  32. run: |
  33. pip install -U mypy
  34. if: "matrix.python-version != 'pypy3'"
  35. - name: Style checks
  36. run: |
  37. python -m flake8
  38. - name: Typing checks
  39. run: |
  40. python -m mypy dulwich
  41. if: "matrix.python-version != 'pypy3'"
  42. - name: Build
  43. run: |
  44. python setup.py build_ext -i
  45. - name: Coverage test suite run
  46. run: |
  47. python -m coverage run -p -m unittest dulwich.tests.test_suite
  48. - name: Upload coverage details
  49. run: |
  50. codecov