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-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. use-new-devservices: true
  49. mode: backend-ci
  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