name: backend typing on: push: branches: - master pull_request: jobs: test: name: backend typing runs-on: ubuntu-18.04 timeout-minutes: 12 strategy: matrix: python-version: [3.8.12] steps: - uses: actions/checkout@v2 # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically # creates a status check in the "pending" state. This means that the workflow needs to run # for every PR in order to update the status checks. # # In order to optimize CI usage, we want the tests to only run when python files change, # since frontend changes should have no effect on these test suites. We cannot use GH workflow # path filters because entire workflow would be skipped vs skipping individual jobs which # would still allow this status check to pass. - name: Check for python file changes uses: getsentry/paths-filter@v2 id: changes with: token: ${{ github.token }} filters: .github/file-filters.yml - name: Setup Python ${{ matrix.python-version }} uses: ./.github/actions/setup-python if: steps.changes.outputs.backend == 'true' with: python-version: ${{ matrix.python-version }} # Since we don't call the setup-sentry action we need to install libxmlsec1-dev - name: Setup backend typing if: steps.changes.outputs.backend == 'true' env: SENTRY_LIGHT_BUILD: 1 run: | sudo apt-get update sudo apt-get install -y --no-install-recommends libxmlsec1-dev python setup.py install_egg_info pip install wheel # GitHub Actions does not have `wheel` installed by default pip install -U -e ".[dev]" - name: Run backend typing (${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }}) if: steps.changes.outputs.backend == 'true' run: | make backend-typing