jest-balance.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: jest balancer
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: '0 0 1,15 * *'
  6. jobs:
  7. jest-balance:
  8. # Buckle up, this may take a while
  9. timeout-minutes: 60
  10. # Make sure this matches the runner that runs frontend tests
  11. runs-on: ubuntu-24.04
  12. steps:
  13. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  14. name: Checkout sentry
  15. - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
  16. id: setup-node
  17. with:
  18. node-version-file: '.volta.json'
  19. - name: node_modules cache
  20. uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
  21. id: nodemodulescache
  22. with:
  23. path: node_modules
  24. key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock', 'api-docs/yarn.lock', '.volta.json') }}
  25. - name: Install Javascript Dependencies
  26. if: steps.nodemodulescache.outputs.cache-hit != 'true'
  27. run: yarn install --frozen-lockfile
  28. - name: jest balancer
  29. env:
  30. GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
  31. GITHUB_PR_REF: ${{ github.event.pull_request.head.ref || github.ref }}
  32. run: JEST_TEST_BALANCER=1 yarn test-ci
  33. - name: Create Pull Request
  34. uses: peter-evans/create-pull-request@b4d51739f96fca8047ad065eccef63442d8e99f7 # v4.2.0
  35. with:
  36. token: ${{ secrets.BUMP_SENTRY_TOKEN }}
  37. add-paths: |
  38. tests/js/test-balancer/jest-balance.json
  39. commit-message: 'ci(jest): regenerate jest-balance.json'
  40. branch: 'ci/jest/rebalance-tests'
  41. delete-branch: true
  42. base: master
  43. title: 'ci(jest): regenerate jest-balance.json'
  44. body: |
  45. This PR was auto-generated - it updates the \`jest-balance.json\` file with new test run data from CI.