python-type-check.yml 995 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Python Type-Check
  2. on:
  3. push:
  4. paths:
  5. - '.github/workflows/python-type-check.yml'
  6. - '**.py'
  7. - '**/requirements*.txt'
  8. pull_request:
  9. paths:
  10. - '.github/workflows/python-type-check.yml'
  11. - '**.py'
  12. - '**/requirements*.txt'
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
  15. cancel-in-progress: true
  16. jobs:
  17. python-type-check:
  18. runs-on: ubuntu-latest
  19. name: pyright type-check
  20. steps:
  21. - name: Check out source repository
  22. uses: actions/checkout@v4
  23. - name: Set up Python environment
  24. uses: actions/setup-python@v5
  25. with:
  26. python-version: "3.11"
  27. - name: Install Python dependencies
  28. # TODO: use a venv
  29. run: pip install -r requirements/requirements-all.txt
  30. - name: Type-check with Pyright
  31. uses: jakebailey/pyright-action@v2
  32. with:
  33. version: 1.1.370
  34. level: warning
  35. warnings: true