pythonpackage.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.5, 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. # path encoding
  22. - os: windows-latest
  23. python-version: 3.5
  24. # path encoding
  25. - os: macos-latest
  26. python-version: 3.5
  27. fail-fast: false
  28. steps:
  29. - uses: actions/checkout@v2
  30. - name: Set up Python ${{ matrix.python-version }}
  31. uses: actions/setup-python@v2
  32. with:
  33. python-version: ${{ matrix.python-version }}
  34. - name: Install native dependencies (Ubuntu)
  35. run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
  36. if: "matrix.os == 'ubuntu-latest'"
  37. - name: Install native dependencies (MacOS)
  38. run: brew install swig gpgme
  39. if: "matrix.os == 'macos-latest'"
  40. - name: Install dependencies
  41. run: |
  42. python -m pip install --upgrade pip
  43. pip install -U pip coverage codecov flake8 fastimport
  44. - name: Install gpg on supported platforms
  45. run: pip install -U gpg
  46. if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"
  47. - name: Install mypy
  48. run: |
  49. pip install -U mypy types-paramiko types-certifi
  50. if: "matrix.python-version != 'pypy3'"
  51. - name: Style checks
  52. run: |
  53. python -m flake8
  54. - name: Typing checks
  55. run: |
  56. python -m mypy dulwich
  57. if: "matrix.python-version != 'pypy3'"
  58. - name: Build
  59. run: |
  60. python setup.py build_ext -i
  61. - name: Coverage test suite run
  62. run: |
  63. python -m coverage run -p -m unittest dulwich.tests.test_suite
  64. - name: Upload coverage details
  65. run: |
  66. codecov