88 required : false
99env :
1010 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11+ # Note this needs to match the shard input to the test matrix below as well as pattern in exclude.
12+ # see jobs.test.strategy.matrix.{shard,exclude}
1113 TOTAL_SHARDS : 15
1214
1315jobs :
@@ -22,12 +24,16 @@ jobs:
2224 go-version : [1.22.x, 1.23.x]
2325 platform : [ubuntu-latest, macos-latest, windows-latest]
2426 feature-flags : ["DEFAULT", "PULUMI_TF_BRIDGE_ACCURATE_BRIDGE_PREVIEW"]
27+ # Needs to match TOTAL_SHARDS
2528 shard : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
2629 exclude :
30+ # We do not run non-default feature flags on non-ubuntu.
2731 - platform : windows-latest
2832 feature-flags : " PULUMI_TF_BRIDGE_ACCURATE_BRIDGE_PREVIEW"
2933 - platform : macos-latest
3034 feature-flags : " PULUMI_TF_BRIDGE_ACCURATE_BRIDGE_PREVIEW"
35+ # Windows and mac test runs do not need to be sharded as they are fast enough.
36+ # In order to do that we will skip all except the 0-th shard.
3137 - platform : windows-latest
3238 shard : 1
3339 - platform : windows-latest
@@ -113,7 +119,7 @@ jobs:
113119 - name : Build PF
114120 run : cd pkg/pf && make build
115121 - name : Shard tests
116- run : echo "SHARD_CMD=$(go run github.com/VenelinMartinov /sharder@9d09afeb1c053b4a0263fbaa5c3c9da1ca2d10e7 --total ${{ env.TOTAL_SHARDS }} --index ${{ matrix.shard }} --output testoutput.txt --format make)" >> $GITHUB_ENV
122+ run : echo "SHARD_CMD=$(go run github.com/pulumi /sharder@828907542fdc6628c49e5139d35fa1f427570550 --total ${{ env.TOTAL_SHARDS }} --index ${{ matrix.shard }} --output test-timings.jsonl --format make)" >> $GITHUB_ENV
117123 if : ${{ matrix.platform == 'ubuntu-latest' }}
118124 - name : Test
119125 run : make VERBOSE=true test_shard
0 commit comments