shuffle-tests.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: shuffle-tests
  2. on:
  3. # Allow manually running
  4. workflow_dispatch:
  5. inputs:
  6. per-test-coverage:
  7. description: Whether to get per-test coverage (uses ./github/workflows/codecov_per_test_coverage.yml)
  8. required: true
  9. default: 'true'
  10. # Run once a week on sunday
  11. schedule:
  12. - cron: '0 1 * * 0'
  13. concurrency:
  14. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  15. cancel-in-progress: true
  16. env:
  17. SENTRY_SHUFFLE_TESTS: true
  18. jobs:
  19. per-test-coverage:
  20. if: ${{ inputs.per-test-coverage == 'true' || github.event_name == 'schedule' }}
  21. uses: ./.github/workflows/codecov_per_test_coverage.yml
  22. secrets: inherit
  23. backend-test:
  24. name: run backend tests
  25. runs-on: ubuntu-24.04
  26. timeout-minutes: 90
  27. permissions:
  28. contents: read
  29. id-token: write
  30. strategy:
  31. # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
  32. # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
  33. fail-fast: false
  34. matrix:
  35. # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
  36. instance: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  37. pg-version: ['14']
  38. env:
  39. # XXX: `MATRIX_INSTANCE_TOTAL` must be hardcoded to the length of `strategy.matrix.instance`.
  40. # If this increases, make sure to also increase `flags.backend.after_n_builds` in `codecov.yml`.
  41. MATRIX_INSTANCE_TOTAL: 11
  42. steps:
  43. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  44. - name: Setup sentry env
  45. uses: ./.github/actions/setup-sentry
  46. id: setup
  47. with:
  48. redis_cluster: true
  49. kafka: true
  50. snuba: true
  51. symbolicator: true
  52. # Right now, we run so few bigtable related tests that the
  53. # overhead of running bigtable in all backend tests
  54. # is way smaller than the time it would take to run in its own job.
  55. bigtable: true
  56. pg-version: ${{ matrix.pg-version }}
  57. - name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
  58. run: |
  59. make test-python-ci