shuffle-tests.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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-22.04
  26. timeout-minutes: 90
  27. strategy:
  28. # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
  29. # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
  30. fail-fast: false
  31. matrix:
  32. # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
  33. instance: [0, 1, 2, 3, 4, 5, 6]
  34. pg-version: ['14']
  35. env:
  36. # XXX: MATRIX_INSTANCE_TOTAL must be hardcoded to the length of strategy.matrix.instance.
  37. MATRIX_INSTANCE_TOTAL: 7
  38. steps:
  39. - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  40. - name: Setup sentry env
  41. uses: ./.github/actions/setup-sentry
  42. id: setup
  43. with:
  44. snuba: true
  45. # Right now, we run so few bigtable related tests that the
  46. # overhead of running bigtable in all backend tests
  47. # is way smaller than the time it would take to run in its own job.
  48. bigtable: true
  49. pg-version: ${{ matrix.pg-version }}
  50. - name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
  51. run: |
  52. make test-python-ci