snuba-integration-test.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: snuba integration
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - releases/**
  7. pull_request:
  8. jobs:
  9. test:
  10. name: snuba test
  11. runs-on: ubuntu-20.04
  12. timeout-minutes: 30
  13. strategy:
  14. matrix:
  15. instance: [0, 1]
  16. env:
  17. USE_SNUBA: 1
  18. MIGRATIONS_TEST_MIGRATE: 1
  19. USE_INDEXER: 1
  20. steps:
  21. - uses: actions/checkout@v2
  22. with:
  23. # Avoid codecov error message related to SHA resolution:
  24. # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
  25. fetch-depth: '2'
  26. # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically
  27. # creates a status check in the "pending" state. This means that the workflow needs to run
  28. # for every PR in order to update the status checks.
  29. #
  30. # In order to optimize CI usage, we want the tests to only run when python files change,
  31. # since frontend changes should have no effect on these test suites. We cannot use GH workflow
  32. # path filters because entire workflow would be skipped vs skipping individual jobs which
  33. # would still allow this status check to pass.
  34. - name: Check for python file changes
  35. uses: getsentry/paths-filter@v2
  36. id: changes
  37. with:
  38. token: ${{ github.token }}
  39. filters: .github/file-filters.yml
  40. - name: Setup sentry env
  41. uses: ./.github/actions/setup-sentry
  42. if: steps.changes.outputs.backend == 'true'
  43. id: setup
  44. with:
  45. pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
  46. snuba: true
  47. kafka: true
  48. - name: Run snuba test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }})
  49. if: steps.changes.outputs.backend == 'true'
  50. run: |
  51. make test-snuba
  52. - name: Handle artifacts
  53. uses: ./.github/actions/artifacts