self-hosted-e2e-tests.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Self-hosted Sentry end to end tests
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - releases/**
  7. pull_request:
  8. # Cancel in progress workflows on pull_requests.
  9. # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  12. cancel-in-progress: true
  13. jobs:
  14. self-hosted-end-to-end:
  15. name: self-hosted tests
  16. runs-on: ubuntu-20.04
  17. # temporary, remove once we are confident the action is working
  18. continue-on-error: true
  19. timeout-minutes: 30
  20. steps:
  21. - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  22. - name: Check for backend file changes
  23. uses: getsentry/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
  24. id: changes
  25. with:
  26. token: ${{ github.token }}
  27. filters: .github/file-filters.yml
  28. - name: Pull the test image
  29. if: steps.changes.outputs.backend_all == 'true'
  30. id: image_pull
  31. env:
  32. SENTRY_TEST_IMAGE: us.gcr.io/sentryio/sentry:${{ github.event.pull_request.head.sha || github.sha }}
  33. run: |
  34. echo "We poll for the Sentry Docker image that the GCB build produces until it succeeds or this job times out."
  35. if [[ -z "$SENTRY_TEST_IMAGE" ]]; then
  36. echo "The SENTRY_TEST_IMAGE needs to be set" 1>&2
  37. exit 1
  38. fi
  39. echo "Polling for $SENTRY_TEST_IMAGE"
  40. until docker pull "$SENTRY_TEST_IMAGE" 2>/dev/null; do
  41. sleep 10
  42. done
  43. echo "sentry-test-image-name=$SENTRY_TEST_IMAGE" >> "$GITHUB_OUTPUT"
  44. # TODO: push the image here
  45. - name: Run Sentry self-hosted e2e CI
  46. if: steps.changes.outputs.backend_all == 'true'
  47. uses: getsentry/action-self-hosted-e2e-tests@fa5b8240848f0e645ac2918c530e60ec8f50e4b8
  48. with:
  49. project_name: sentry
  50. local_image: ${{ steps.image_pull.outputs.sentry-test-image-name }}
  51. docker_repo: docker.io/getsentry/sentry