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