@samitouri / QOS-React-1 / commits / 8ae78f39fb

CI: reduce job waterfall for runtime test jobs (#30303)

The first job was just printing static JSON. This simplifies the job config a bit and allows the test jobs to start earlier.

Jan Kassens committed Jul 10, 2024 at 10:33 UTC 8ae78f39fbd90f4a2c26c4be36030732b435192e
1 file changed +28 -56
.github/workflows/runtime_test.yml
+28 -56
@@ -7,66 +7,38 @@ on:
7 paths-ignore:
8 - 'compiler/**'
9
10 -env:
11 - # Number of workers (one per shard) to spawn
12 - SHARD_COUNT: 5
13 -
10 jobs:
15 - # Define the various test parameters and parallelism for this workflow
16 - build_test_params:
17 - name: Build test params
18 - runs-on: ubuntu-latest
19 - outputs:
20 - params: ${{ steps.define-params.outputs.result }}
21 - shard_id: ${{ steps.define-shards.outputs.result }}
22 - steps:
23 - - uses: actions/github-script@v7
24 - id: define-shards
25 - with:
26 - script: |
27 - function range(from, to) {
28 - const arr = [];
29 - for (let n = from; n <= to; n++) {
30 - arr.push(n);
31 - }
32 - return arr;
33 - }
34 - return range(1, process.env.SHARD_COUNT);
35 - - uses: actions/github-script@v7
36 - id: define-params
37 - with:
38 - script: |
39 - return [
40 - "-r=stable --env=development",
41 - "-r=stable --env=production",
42 - "-r=experimental --env=development",
43 - "-r=experimental --env=production",
44 - "-r=www-classic --env=development --variant=false",
45 - "-r=www-classic --env=production --variant=false",
46 - "-r=www-classic --env=development --variant=true",
47 - "-r=www-classic --env=production --variant=true",
48 - "-r=www-modern --env=development --variant=false",
49 - "-r=www-modern --env=production --variant=false",
50 - "-r=www-modern --env=development --variant=true",
51 - "-r=www-modern --env=production --variant=true",
52 - "-r=xplat --env=development --variant=false",
53 - "-r=xplat --env=development --variant=true",
54 - "-r=xplat --env=production --variant=false",
55 - "-r=xplat --env=production --variant=true",
56 - // TODO: Test more persistent configurations?
57 - "-r=stable --env=development --persistent",
58 - "-r=experimental --env=development --persistent"
59 - ];
60 -
61 - # Spawn a job for each shard for a given set of test params
11 test:
63 - name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
12 + name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard }})
13 runs-on: ubuntu-latest
65 - needs: build_test_params
14 strategy:
15 matrix:
68 - params: ${{ fromJSON(needs.build_test_params.outputs.params) }}
69 - shard_id: ${{ fromJSON(needs.build_test_params.outputs.shard_id) }}
16 + params:
17 + - "-r=stable --env=development"
18 + - "-r=stable --env=production"
19 + - "-r=experimental --env=development"
20 + - "-r=experimental --env=production"
21 + - "-r=www-classic --env=development --variant=false"
22 + - "-r=www-classic --env=production --variant=false"
23 + - "-r=www-classic --env=development --variant=true"
24 + - "-r=www-classic --env=production --variant=true"
25 + - "-r=www-modern --env=development --variant=false"
26 + - "-r=www-modern --env=production --variant=false"
27 + - "-r=www-modern --env=development --variant=true"
28 + - "-r=www-modern --env=production --variant=true"
29 + - "-r=xplat --env=development --variant=false"
30 + - "-r=xplat --env=development --variant=true"
31 + - "-r=xplat --env=production --variant=false"
32 + - "-r=xplat --env=production --variant=true"
33 + # TODO: Test more persistent configurations?
34 + - "-r=stable --env=development --persistent"
35 + - "-r=experimental --env=development --persistent"
36 + shard:
37 + - 1/5
38 + - 2/5
39 + - 3/5
40 + - 4/5
41 + - 5/5
42 continue-on-error: true
43 steps:
44 - uses: actions/checkout@v4
@@ -82,4 +54,4 @@ jobs:
54 path: "**/node_modules"
55 key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
56 - run: yarn install --frozen-lockfile
85 - - run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard_id }}/${{ env.SHARD_COUNT }}
57 + - run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard }}