relay-integration-test.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. name: relay integration
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - releases/**
  7. pull_request:
  8. jobs:
  9. test:
  10. name: relay test
  11. runs-on: ubuntu-20.04
  12. timeout-minutes: 10
  13. steps:
  14. - uses: actions/checkout@v2
  15. with:
  16. # Avoid codecov error message related to SHA resolution:
  17. # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
  18. fetch-depth: '2'
  19. - name: Check for python file changes
  20. uses: getsentry/paths-filter@v2
  21. id: changes
  22. with:
  23. token: ${{ github.token }}
  24. filters: .github/file-filters.yml
  25. - name: Set python version output
  26. id: python-version
  27. run: |
  28. echo "::set-output name=python-version::$(cat .python-version)"
  29. # Until GH composite actions can use `uses`, we need to setup python here
  30. - uses: actions/setup-python@v2
  31. if: steps.changes.outputs.backend == 'true'
  32. with:
  33. python-version: ${{ steps.python-version.outputs.python-version }}
  34. - name: Setup pip
  35. uses: ./.github/actions/setup-pip
  36. id: pip
  37. if: steps.changes.outputs.backend == 'true'
  38. - name: pip cache
  39. uses: actions/cache@v2
  40. if: steps.changes.outputs.backend == 'true'
  41. with:
  42. path: ${{ steps.pip.outputs.pip-cache-dir }}
  43. key: |
  44. ${{ runner.os }}-py${{ steps.python-version.outputs.python-version }}-pip${{ steps.pip.outputs.pip-version }}-${{ secrets.PIP_CACHE_VERSION }}-${{ hashFiles('requirements-*.txt', '!requirements-pre-commit.txt') }}
  45. - name: Setup sentry env
  46. uses: ./.github/actions/setup-sentry
  47. id: setup
  48. if: steps.changes.outputs.backend == 'true'
  49. with:
  50. snuba: true
  51. kafka: true
  52. - name: Pull relay image
  53. if: steps.changes.outputs.backend == 'true'
  54. run: |
  55. # pull relay we'll run and kill it for each test
  56. docker pull us.gcr.io/sentryio/relay:nightly
  57. docker ps -a
  58. - name: Run test
  59. if: steps.changes.outputs.backend == 'true'
  60. run: |
  61. make test-relay-integration
  62. - name: Handle artifacts
  63. uses: ./.github/actions/artifacts