relay-integration-test.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. restore-keys: |
  46. ${{ runner.os }}-py${{ steps.python-version.outputs.python-version }}-pip${{ steps.pip.outputs.pip-version }}-${{ secrets.PIP_CACHE_VERSION }}
  47. - name: Setup sentry env
  48. uses: ./.github/actions/setup-sentry
  49. id: setup
  50. if: steps.changes.outputs.backend == 'true'
  51. with:
  52. snuba: true
  53. kafka: true
  54. - name: Pull relay image
  55. if: steps.changes.outputs.backend == 'true'
  56. run: |
  57. # pull relay we'll run and kill it for each test
  58. docker pull us.gcr.io/sentryio/relay:nightly
  59. docker ps -a
  60. - name: Run test
  61. if: steps.changes.outputs.backend == 'true'
  62. run: |
  63. make test-relay-integration
  64. - name: Handle artifacts
  65. uses: ./.github/actions/artifacts