python-type-check.yml 1.0 KB

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