backend-typing.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: backend typing
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. jobs:
  8. test:
  9. name: backend typing
  10. runs-on: ubuntu-18.04
  11. timeout-minutes: 12
  12. strategy:
  13. matrix:
  14. python-version: [3.8.12]
  15. steps:
  16. - uses: actions/checkout@v2
  17. # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically
  18. # creates a status check in the "pending" state. This means that the workflow needs to run
  19. # for every PR in order to update the status checks.
  20. #
  21. # In order to optimize CI usage, we want the tests to only run when python files change,
  22. # since frontend changes should have no effect on these test suites. We cannot use GH workflow
  23. # path filters because entire workflow would be skipped vs skipping individual jobs which
  24. # would still allow this status check to pass.
  25. - name: Check for python file changes
  26. uses: getsentry/paths-filter@v2
  27. id: changes
  28. with:
  29. token: ${{ github.token }}
  30. filters: .github/file-filters.yml
  31. - name: Setup Python ${{ matrix.python-version }}
  32. uses: ./.github/actions/setup-python
  33. if: steps.changes.outputs.backend == 'true'
  34. with:
  35. python-version: ${{ matrix.python-version }}
  36. # Since we don't call the setup-sentry action we need to install libxmlsec1-dev
  37. - name: Setup backend typing
  38. if: steps.changes.outputs.backend == 'true'
  39. env:
  40. SENTRY_LIGHT_BUILD: 1
  41. run: |
  42. sudo apt-get update
  43. sudo apt-get install -y --no-install-recommends libxmlsec1-dev
  44. python setup.py install_egg_info
  45. pip install wheel # GitHub Actions does not have `wheel` installed by default
  46. pip install -U -e ".[dev]"
  47. - name: Run backend typing (${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }})
  48. if: steps.changes.outputs.backend == 'true'
  49. run: |
  50. make backend-typing