snuba-integration-test-py2.7.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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-16.04
  12. timeout-minutes: 20
  13. strategy:
  14. matrix:
  15. instance: [0]
  16. env:
  17. USE_SNUBA: 1
  18. MIGRATIONS_TEST_MIGRATE: 1
  19. steps:
  20. - uses: actions/checkout@v2
  21. # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically
  22. # creates a status check in the "pending" state. This means that the workflow needs to run
  23. # for every PR in order to update the status checks.
  24. #
  25. # In order to optimize CI usage, we want the tests to only run when python files change,
  26. # since frontend changes should have no effect on these test suites. We cannot use GH workflow
  27. # path filters because entire workflow would be skipped vs skipping individual jobs which
  28. # would still allow this status check to pass.
  29. - name: Check for python file changes
  30. uses: getsentry/paths-filter@v2
  31. id: changes
  32. with:
  33. token: ${{ github.token }}
  34. filters: .github/file-filters.yml
  35. # Until GH composite actions can use `uses`, we need to setup python here
  36. - uses: actions/setup-python@v2
  37. if: steps.changes.outputs.backend == 'true'
  38. with:
  39. python-version: 2.7.17
  40. - name: Setup pip
  41. uses: ./.github/actions/setup-pip
  42. id: pip
  43. if: steps.changes.outputs.backend == 'true'
  44. - name: pip cache
  45. uses: actions/cache@v2
  46. if: steps.changes.outputs.backend == 'true'
  47. with:
  48. path: ${{ steps.pip.outputs.pip-cache-dir }}
  49. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-*.txt') }}
  50. restore-keys: |
  51. ${{ runner.os }}-pip-
  52. - name: Setup sentry env
  53. uses: ./.github/actions/setup-sentry
  54. id: setup
  55. if: steps.changes.outputs.backend == 'true'
  56. with:
  57. python: 2
  58. snuba: true
  59. kafka: true
  60. - name: Run snuba test [py2.7] (${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }})
  61. if: steps.changes.outputs.backend == 'true'
  62. run: |
  63. make travis-test-snuba