snuba-integration-test.yml 1.9 KB

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