shuffle-tests.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: shuffle-tests
  2. on:
  3. # Allow manually running
  4. workflow_dispatch:
  5. # Run once a week on sunday
  6. schedule:
  7. - cron: '0 1 * * 0'
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  10. cancel-in-progress: true
  11. env:
  12. SENTRY_SHUFFLE_TESTS: true
  13. jobs:
  14. backend-test:
  15. name: run backend tests
  16. runs-on: ubuntu-20.04
  17. timeout-minutes: 40
  18. strategy:
  19. # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
  20. # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
  21. fail-fast: false
  22. matrix:
  23. # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
  24. instance: [0, 1, 2, 3]
  25. pg-version: ['14']
  26. env:
  27. # XXX: MATRIX_INSTANCE_TOTAL must be hardcoded to the length of strategy.matrix.instance.
  28. MATRIX_INSTANCE_TOTAL: 4
  29. steps:
  30. - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  31. with:
  32. # Avoid codecov error message related to SHA resolution:
  33. # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
  34. fetch-depth: '2'
  35. - name: Setup sentry env
  36. uses: ./.github/actions/setup-sentry
  37. id: setup
  38. with:
  39. snuba: true
  40. # Right now, we run so few bigtable related tests that the
  41. # overhead of running bigtable in all backend tests
  42. # is way smaller than the time it would take to run in its own job.
  43. bigtable: true
  44. pg-version: ${{ matrix.pg-version }}
  45. - name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
  46. run: |
  47. make test-python-ci