This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | jobs: | |
| setup-tests: | |
| name: Setup Tests | |
| runs-on: ubuntu-latest | |
| outputs: | |
| test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} | |
| test-chunk-ids: ${{ steps['set-test-chunk-ids'].outputs['test-chunk-ids'] }} | |
| env: | |
| TESTS_NUM_CHUNKS: 3 | |
| steps: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env zx | |
| import { readFileSync, writeFileSync } from 'fs'; | |
| import path from 'path'; | |
| const NUM_BUCKETS = process.env.TESTS_NUM_CHUNKS || 3; | |
| // Download latest jest package timings for each chunk from the last green build | |
| // on the default branch. | |
| const downloadTimings = async () => { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| Returns a single bucket of packages that in total, meet target sum. | |
| */ | |
| const getBucket = (A, target) => { | |
| const last = A.pop(); | |
| let sum = getTiming(last); | |
| const result = [last]; | |
| if (A.length === 0) return result; |