|
8 | 8 | required: false |
9 | 9 | env: |
10 | 10 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 11 | + TOTAL_SHARDS: 10 |
11 | 12 |
|
12 | 13 | jobs: |
13 | 14 | test: |
|
21 | 22 | go-version: [1.22.x, 1.23.x] |
22 | 23 | platform: [ubuntu-latest, macos-latest, windows-latest] |
23 | 24 | feature-flags: ["DEFAULT", "PULUMI_TF_BRIDGE_ACCURATE_BRIDGE_PREVIEW"] |
| 25 | + shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] |
| 26 | + exclude: |
| 27 | + - platform: windows-latest |
| 28 | + feature-flags: "PULUMI_TF_BRIDGE_ACCURATE_BRIDGE_PREVIEW" |
| 29 | + - platform: macos-latest |
| 30 | + feature-flags: "PULUMI_TF_BRIDGE_ACCURATE_BRIDGE_PREVIEW" |
| 31 | + - platform: windows-latest |
| 32 | + shard: 1 |
| 33 | + - platform: windows-latest |
| 34 | + shard: 2 |
| 35 | + - platform: windows-latest |
| 36 | + shard: 3 |
| 37 | + - platform: windows-latest |
| 38 | + shard: 4 |
| 39 | + - platform: windows-latest |
| 40 | + shard: 5 |
| 41 | + - platform: windows-latest |
| 42 | + shard: 6 |
| 43 | + - platform: windows-latest |
| 44 | + shard: 7 |
| 45 | + - platform: windows-latest |
| 46 | + shard: 8 |
| 47 | + - platform: windows-latest |
| 48 | + shard: 9 |
| 49 | + - platform: macos-latest |
| 50 | + shard: 1 |
| 51 | + - platform: macos-latest |
| 52 | + shard: 2 |
| 53 | + - platform: macos-latest |
| 54 | + shard: 3 |
| 55 | + - platform: macos-latest |
| 56 | + shard: 4 |
| 57 | + - platform: macos-latest |
| 58 | + shard: 5 |
| 59 | + - platform: macos-latest |
| 60 | + shard: 6 |
| 61 | + - platform: macos-latest |
| 62 | + shard: 7 |
| 63 | + - platform: macos-latest |
| 64 | + shard: 8 |
| 65 | + - platform: macos-latest |
| 66 | + shard: 9 |
24 | 67 | runs-on: ${{ matrix.platform }} |
25 | 68 | steps: |
26 | 69 | - name: Install pulumi |
|
45 | 88 | run: make build |
46 | 89 | - name: Build PF |
47 | 90 | run: cd pkg/pf && make build |
| 91 | + - name: Shard tests |
| 92 | + run: go run github.com/VenelinMartinov/sharder@afedd5abd19314e70434e3530a13b3ef20ac4e46 --total ${{ env.TOTAL_SHARDS }} --index ${{ matrix.shard }} --format env --output testoutput.txt |
| 93 | + - run: echo "$SHARD_CMD" |
| 94 | + - name: Test |
| 95 | + run: make VERBOSE=true test_shard |
| 96 | + if: ${{ matrix.platform == 'ubuntu-latest' }} |
48 | 97 | - name: Test |
49 | 98 | run: make test |
| 99 | + if: ${{ matrix.platform != 'ubuntu-latest' }} |
50 | 100 | - name: Upload coverage reports to Codecov |
51 | 101 | # If we have a CODECOV_TOKEN secret, then we upload it to get a coverage report. |
52 | 102 | # |
|
0 commit comments