test.yml 904 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Test
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. env:
  8. GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  9. jobs:
  10. build:
  11. runs-on: ${{ matrix.platform }}
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. python-version: ["3.8", "3.9", "3.10", "3.11"]
  16. platform: [ubuntu-latest, windows-latest]
  17. steps:
  18. - uses: actions/checkout@v4
  19. with:
  20. submodules: recursive
  21. fetch-depth: 0
  22. - name: Set up Python ${{ matrix.python-version }}
  23. uses: actions/setup-python@v5
  24. with:
  25. python-version: ${{ matrix.python-version }}
  26. - name: Install packages
  27. run: |
  28. pip install '.[dev]'
  29. pip install black pylint
  30. - name: Check formatting
  31. run: |
  32. black --diff --check Lib --exclude ".*_pb2.*|_version.py"
  33. - name: Run Tests
  34. run: |
  35. pytest tests