shuffle-tests.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. with:
  41. # Avoid codecov error message related to SHA resolution:
  42. # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
  43. fetch-depth: '2'
  44. - name: Setup sentry env
  45. uses: ./.github/actions/setup-sentry
  46. id: setup
  47. with:
  48. snuba: true
  49. # Right now, we run so few bigtable related tests that the
  50. # overhead of running bigtable in all backend tests
  51. # is way smaller than the time it would take to run in its own job.
  52. bigtable: true
  53. pg-version: ${{ matrix.pg-version }}
  54. - name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
  55. run: |
  56. make test-python-ci