|
19 | 19 | default: false
|
20 | 20 |
|
21 | 21 | jobs:
|
22 |
| - efps: |
| 22 | + efps-test: |
23 | 23 | timeout-minutes: 30
|
24 | 24 | runs-on: ubuntu-latest
|
25 | 25 | env:
|
26 | 26 | TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
27 | 27 | TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
| 28 | + strategy: |
| 29 | + fail-fast: false |
| 30 | + matrix: |
| 31 | + # Add more shards here if needed |
| 32 | + shardIndex: [1, 2, 3] |
| 33 | + shardTotal: [3] |
28 | 34 | steps:
|
29 | 35 | - uses: actions/checkout@v4
|
30 | 36 | - uses: actions/setup-node@v4
|
@@ -84,18 +90,65 @@ jobs:
|
84 | 90 | REFERENCE_TAG: ${{ github.event.inputs.reference_tag || 'latest' }}
|
85 | 91 | ENABLE_PROFILER: ${{ github.event.inputs.enable_profiler || false }}
|
86 | 92 | RECORD_VIDEO: ${{ github.event.inputs.record_video || false }}
|
87 |
| - run: pnpm efps:test |
| 93 | + run: pnpm efps:test -- -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }} |
| 94 | + |
| 95 | + - uses: actions/upload-artifact@v3 |
| 96 | + if: always() |
| 97 | + with: |
| 98 | + name: efps-report |
| 99 | + path: ${{ github.workspace }}/perf/efps/results/ |
| 100 | + retention-days: 30 |
| 101 | + |
| 102 | + merge-reports: |
| 103 | + if: always() |
| 104 | + needs: [efps-test] |
| 105 | + runs-on: ubuntu-latest |
| 106 | + steps: |
| 107 | + - uses: actions/checkout@v4 |
| 108 | + - uses: actions/setup-node@v4 |
| 109 | + with: |
| 110 | + node-version: 18 |
| 111 | + |
| 112 | + - uses: pnpm/action-setup@v4 |
| 113 | + name: Install pnpm |
| 114 | + id: pnpm-install |
| 115 | + with: |
| 116 | + run_install: false |
| 117 | + |
| 118 | + - name: Get pnpm store directory |
| 119 | + id: pnpm-cache |
| 120 | + shell: bash |
| 121 | + run: | |
| 122 | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT |
| 123 | +
|
| 124 | + - name: Cache node modules |
| 125 | + id: cache-node-modules |
| 126 | + uses: actions/cache@v4 |
| 127 | + env: |
| 128 | + cache-name: cache-node-modules |
| 129 | + with: |
| 130 | + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} |
| 131 | + key: ${{ runner.os }}-pnpm-store-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 132 | + restore-keys: | |
| 133 | + v1-${{ runner.os }}-pnpm-store-${{ env.cache-name }}- |
| 134 | + v1-${{ runner.os }}-pnpm-store- |
| 135 | + v1-${{ runner.os }}- |
| 136 | +
|
| 137 | + - name: Install project dependencies |
| 138 | + run: pnpm install |
| 139 | + |
| 140 | + - name: Download blob reports from Github Actions Artifacts |
| 141 | + uses: actions/download-artifact@v3 |
| 142 | + with: |
| 143 | + name: efps-report |
| 144 | + path: perf/efps/results |
| 145 | + |
| 146 | + - name: Write report |
| 147 | + run: pnpm efps:write:report |
88 | 148 |
|
89 | 149 | - name: PR comment with report
|
90 | 150 | uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2
|
91 | 151 | if: ${{ github.event_name == 'pull_request' }}
|
92 | 152 | with:
|
93 | 153 | comment_tag: "efps-report"
|
94 | 154 | filePath: ${{ github.workspace }}/perf/efps/results/benchmark-results.md
|
95 |
| - |
96 |
| - - uses: actions/upload-artifact@v3 |
97 |
| - if: always() |
98 |
| - with: |
99 |
| - name: efps-report |
100 |
| - path: perf/efps/results |
101 |
| - retention-days: 30 |
|
0 commit comments