shuffle-tests.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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: ['9.6']
  26. env:
  27. # XXX: MATRIX_INSTANCE_TOTAL must be hardcoded to the length of strategy.matrix.instance.
  28. MATRIX_INSTANCE_TOTAL: 4
  29. MIGRATIONS_TEST_MIGRATE: 1
  30. steps:
  31. - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  32. with:
  33. # Avoid codecov error message related to SHA resolution:
  34. # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
  35. fetch-depth: '2'
  36. - name: Setup sentry env
  37. uses: ./.github/actions/setup-sentry
  38. id: setup
  39. with:
  40. snuba: true
  41. # Right now, we run so few bigtable related tests that the
  42. # overhead of running bigtable in all backend tests
  43. # is way smaller than the time it would take to run in its own job.
  44. bigtable: true
  45. pg-version: ${{ matrix.pg-version }}
  46. - name: Run backend test (${{ steps.setup.outputs.matrix-instance-number }} of ${{ steps.setup.outputs.matrix-instance-total }})
  47. run: |
  48. make test-python-ci
  49. - name: Handle artifacts
  50. uses: ./.github/actions/artifacts