test.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. name: Test
  2. on: [push, pull_request]
  3. jobs:
  4. test-ubuntu-latest-python-latest:
  5. needs: lint
  6. strategy:
  7. matrix:
  8. os: [ubuntu-latest]
  9. python-version: ['3.14']
  10. runs-on: ${{ matrix.os }}
  11. steps:
  12. - uses: actions/checkout@v4
  13. - uses: actions/setup-python@v5
  14. with:
  15. python-version: ${{ matrix.python-version }}
  16. - name: Install Test dependencies
  17. run: pip install tox
  18. - name: Test with latest Python on Ubuntu
  19. run: tox -c pyproject.toml -e py
  20. test-python-latest:
  21. needs: test-ubuntu-latest-python-latest:
  22. strategy:
  23. matrix:
  24. os: [macos-latest, windows-latest]
  25. python-version: ['3.14']
  26. runs-on: ${{ matrix.os }}
  27. steps:
  28. - uses: actions/checkout@v4
  29. - uses: actions/setup-python@v5
  30. with:
  31. python-version: ${{ matrix.python-version }}
  32. - name: Install Test dependencies
  33. run: pip install tox
  34. - name: Test with latest Python on other OS
  35. run: tox -c pyproject.toml -e py
  36. test:
  37. needs: test-python-latest
  38. strategy:
  39. matrix:
  40. os: [ubuntu-latest, macos-latest, windows-latest]
  41. python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', pypy-3.9', 'pypy-3.10', 'pypy-3.11']
  42. exclude:
  43. - os: windows-latest
  44. python-version: 'pypy-3.9'
  45. - os: windows-latest
  46. python-version: 'pypy-3.10'
  47. - os: windows-latest
  48. python-version: 'pypy-3.11'
  49. runs-on: ${{ matrix.os }}
  50. steps:
  51. - uses: actions/checkout@v4
  52. - uses: actions/setup-python@v5
  53. with:
  54. python-version: ${{ matrix.python-version }}
  55. - name: Install Test dependencies
  56. run: pip install tox
  57. - name: Test with older Python
  58. run: tox -c pyproject.toml -e py
  59. coveralls-test:
  60. if: github.event_name == 'push'
  61. strategy:
  62. matrix:
  63. os: [ubuntu-latest]
  64. python-version: ['3.13']
  65. runs-on: ${{ matrix.os }}
  66. steps:
  67. - uses: actions/checkout@v4
  68. - uses: actions/setup-python@v5
  69. with:
  70. python-version: ${{ matrix.python-version }}
  71. - name: Install Test dependencies
  72. run: pip install tox
  73. - name: Test
  74. run: tox -c pyproject.toml -e py
  75. - name: Install Coveralls
  76. if: github.event_name == 'push'
  77. run: pip install coveralls
  78. - name: Upload coverage to Coveralls
  79. if: github.event_name == 'push'
  80. env:
  81. COVERALLS_PARALLEL: true
  82. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  83. run: coveralls --service=github
  84. coveralls-finish:
  85. needs: coveralls-test
  86. if: github.event_name == 'push'
  87. runs-on: ubuntu-latest
  88. steps:
  89. - uses: actions/setup-python@v5
  90. with:
  91. python-version: 3.x
  92. - name: Install Coveralls
  93. run: pip install coveralls
  94. - name: Finish Coveralls parallel builds
  95. env:
  96. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  97. run: coveralls --service=github --finish
  98. lint:
  99. runs-on: ubuntu-latest
  100. steps:
  101. - uses: actions/checkout@v4
  102. - uses: actions/setup-python@v5
  103. with:
  104. python-version: '3.13'
  105. - name: Install tox
  106. run: pip install tox
  107. - name: Lint
  108. run: tox -c pyproject.toml -e flake8,mypy,isort