2828 runs-on : " ubuntu-latest"
2929
3030 outputs :
31- matrix : ${{ steps.download-data .outputs.matrix }}
31+ matrix : ${{ steps.shards .outputs.shards }}
3232
3333 steps :
3434 - name : " Checkout"
@@ -55,11 +55,15 @@ jobs:
5555
5656 - name : " Download data"
5757 working-directory : " issue-bot"
58- id : download-data
5958 env :
6059 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
61- run : echo "matrix=$( ./console.php download)" >> $GITHUB_OUTPUT
60+ run : ./console.php download > matrix.json
6261
62+ - name : " Output shards"
63+ id : shards
64+ working-directory : " issue-bot"
65+ run : |
66+ echo "shards=$(jq -c '{include: [range(length) | {shard: .}]}' matrix.json)" >> $GITHUB_OUTPUT
6367
6468 - uses : actions/upload-artifact@v4
6569 with :
7175 name : issue-cache
7276 path : issue-bot/tmp/issueCache.tmp
7377
78+ - uses : actions/upload-artifact@v4
79+ with :
80+ name : matrix
81+ path : issue-bot/matrix.json
82+
7483 analyse :
7584 name : " Analyse"
7685 needs : download
@@ -109,15 +118,32 @@ jobs:
109118 attempt_limit : 5
110119 attempt_delay : 1000
111120
121+ -
uses :
Wandalen/[email protected] 122+ with :
123+ action : actions/download-artifact@v4
124+ with : |
125+ name: matrix
126+ path: issue-bot
127+ attempt_limit : 5
128+ attempt_delay : 1000
129+
130+ - name : " Extract shard"
131+ working-directory : " issue-bot"
132+ id : chunk
133+ run : |
134+ echo "phpVersion=$(jq -r '.[${{ matrix.shard }}].phpVersion' matrix.json)" >> "$GITHUB_OUTPUT"
135+ echo "playgroundExamples=$(jq -r '.[${{ matrix.shard }}].playgroundExamples' matrix.json)" >> "$GITHUB_OUTPUT"
136+ echo "chunkNumber=$(jq -r '.[${{ matrix.shard }}].chunkNumber' matrix.json)" >> "$GITHUB_OUTPUT"
137+
112138 - name : " Run PHPStan"
113139 working-directory : " issue-bot"
114140 timeout-minutes : 5
115- run : ./console.php run ${{ matrix. phpVersion }} ${{ matrix .playgroundExamples }}
141+ run : ./console.php run ${{ steps.chunk.outputs. phpVersion }} ${{ steps.chunk.outputs .playgroundExamples }}
116142
117143 - uses : actions/upload-artifact@v4
118144 with :
119- name : results-${{ matrix. phpVersion }}-${{ matrix .chunkNumber }}
120- path : issue-bot/tmp/results-${{ matrix .phpVersion }}-*.tmp
145+ name : results-${{ steps.chunk.outputs. phpVersion }}-${{ steps.chunk.outputs .chunkNumber }}
146+ path : issue-bot/tmp/results-${{ steps.chunk.outputs .phpVersion }}-*.tmp
121147
122148 evaluate :
123149 name : " Evaluate results"
0 commit comments