snuba-integration-test-py3.6.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: snuba integration [py3.6]
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - releases/**
  7. pull_request:
  8. jobs:
  9. test:
  10. runs-on: ubuntu-16.04
  11. timeout-minutes: 30
  12. strategy:
  13. matrix:
  14. instance: [0]
  15. env:
  16. # Note: `USE_SNUBA` is only used for the Snuba test suite because we have some failing acceptance tests with Snuba enabled.
  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. - name: Set python version output
  36. id: python-version
  37. if: steps.changes.outputs.backend == 'true'
  38. run: |
  39. echo "::set-output name=python-version::$(awk 'FNR == 2' .python-version)"
  40. # Until GH composite actions can use `uses`, we need to setup python here
  41. - uses: actions/setup-python@v2
  42. if: steps.changes.outputs.backend == 'true'
  43. with:
  44. python-version: ${{ steps.python-version.outputs.python-version }}
  45. - name: Setup pip
  46. uses: ./.github/actions/setup-pip
  47. if: steps.changes.outputs.backend == 'true'
  48. id: pip
  49. - name: pip cache
  50. uses: actions/cache@v2
  51. if: steps.changes.outputs.backend == 'true'
  52. with:
  53. path: ${{ steps.pip.outputs.pip-cache-dir }}
  54. key: ${{ runner.os }}-pip-py${{ steps.python-version.outputs.python-version }}-${{ hashFiles('**/requirements-*.txt') }}
  55. restore-keys: |
  56. ${{ runner.os }}-pip-py${{ steps.python-version.outputs.python-version }}
  57. - name: Setup sentry env
  58. uses: ./.github/actions/setup-sentry
  59. if: steps.changes.outputs.backend == 'true'
  60. id: setup
  61. with:
  62. python: 3
  63. snuba: true
  64. kafka: true
  65. - name: Run snuba test [py3.6] (${{ steps.setup.outputs.matrix-instance-number }} of ${{ strategy.job-total }})
  66. if: steps.changes.outputs.backend == 'true'
  67. run: |
  68. make travis-test-snuba