2
0

pythonpackage.yml 1.9 KB

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