test.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. name: Test
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. strategy:
  6. matrix:
  7. os: [ubuntu-latest, macos-latest, windows-latest]
  8. python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11']
  9. exclude:
  10. - os: windows-latest
  11. python-version: 'pypy-3.9'
  12. - os: windows-latest
  13. python-version: 'pypy-3.10'
  14. - os: windows-latest
  15. python-version: 'pypy-3.11'
  16. runs-on: ${{ matrix.os }}
  17. steps:
  18. - uses: actions/checkout@v4
  19. - uses: actions/setup-python@v5
  20. with:
  21. python-version: ${{ matrix.python-version }}
  22. - name: Install Test dependencies
  23. run: pip install tox
  24. - name: Test
  25. run: tox -c pyproject.toml -e py
  26. coveralls-test:
  27. if: github.event_name == 'push'
  28. strategy:
  29. matrix:
  30. os: [ubuntu-latest]
  31. python-version: ['3.13']
  32. runs-on: ${{ matrix.os }}
  33. steps:
  34. - uses: actions/checkout@v4
  35. - uses: actions/setup-python@v5
  36. with:
  37. python-version: ${{ matrix.python-version }}
  38. - name: Install Test dependencies
  39. run: pip install tox
  40. - name: Test
  41. run: tox -c pyproject.toml -e py
  42. - name: Install Coveralls
  43. if: github.event_name == 'push'
  44. run: pip install coveralls
  45. - name: Upload coverage to Coveralls
  46. if: github.event_name == 'push'
  47. env:
  48. COVERALLS_PARALLEL: true
  49. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  50. run: coveralls --service=github
  51. coveralls-finish:
  52. needs: coveralls-test
  53. if: github.event_name == 'push'
  54. runs-on: ubuntu-latest
  55. steps:
  56. - uses: actions/setup-python@v5
  57. with:
  58. python-version: 3.x
  59. - name: Install Coveralls
  60. run: pip install coveralls
  61. - name: Finish Coveralls parallel builds
  62. env:
  63. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  64. run: coveralls --service=github --finish
  65. lint:
  66. runs-on: ubuntu-latest
  67. steps:
  68. - uses: actions/checkout@v4
  69. - uses: actions/setup-python@v5
  70. with:
  71. python-version: '3.13.0'
  72. - name: Install tox
  73. run: pip install tox
  74. - name: Lint
  75. run: tox -c pyproject.toml -e flake8,mypy,isort