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"
@@ -38,11 +38,12 @@ jobs:
3838 uses : " shivammathur/setup-php@v2"
3939 with :
4040 coverage : " none"
41- php-version : " 8.3 "
41+ php-version : " 8.5 "
4242
43- - name : " Install Issue Bot dependencies"
44- working-directory : " issue-bot"
45- run : " composer install --no-interaction --no-progress"
43+ - name : " Install issue-bot dependencies"
44+ uses : " ramsey/composer-install@v3"
45+ with :
46+ working-directory : " issue-bot"
4647
4748 - name : " Cache downloads"
4849 uses : actions/cache@v4
@@ -54,11 +55,15 @@ jobs:
5455
5556 - name : " Download data"
5657 working-directory : " issue-bot"
57- id : download-data
5858 env :
5959 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
60- run : echo "matrix=$( ./console.php download)" >> $GITHUB_OUTPUT
60+ run : ./console.php download > matrix.json
6161
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
6267
6368 - uses : actions/upload-artifact@v4
6469 with :
7075 name : issue-cache
7176 path : issue-bot/tmp/issueCache.tmp
7277
78+ - uses : actions/upload-artifact@v4
79+ with :
80+ name : matrix
81+ path : issue-bot/matrix.json
82+
7383 analyse :
7484 name : " Analyse"
7585 needs : download
@@ -88,14 +98,16 @@ jobs:
8898 uses : " shivammathur/setup-php@v2"
8999 with :
90100 coverage : " none"
91- php-version : " 8.3 "
101+ php-version : " 8.5 "
92102
93- - name : " Install dependencies"
94- run : " composer install --no-interaction --no-progress --no-dev"
103+ - uses : " ramsey/composer-install@v3"
104+ with :
105+ composer-options : " --no-dev"
95106
96- - name : " Install Issue Bot dependencies"
97- working-directory : " issue-bot"
98- run : " composer install --no-interaction --no-progress"
107+ - name : " Install issue-bot dependencies"
108+ uses : " ramsey/composer-install@v3"
109+ with :
110+ working-directory : " issue-bot"
99111
100112 - uses : Wandalen/wretry.action@v3.8.0
101113 with :
@@ -106,15 +118,32 @@ jobs:
106118 attempt_limit : 5
107119 attempt_delay : 1000
108120
121+ - uses : Wandalen/wretry.action@v3.8.0
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+
109138 - name : " Run PHPStan"
110139 working-directory : " issue-bot"
111140 timeout-minutes : 5
112- run : ./console.php run ${{ matrix. phpVersion }} ${{ matrix .playgroundExamples }}
141+ run : ./console.php run ${{ steps.chunk.outputs. phpVersion }} ${{ steps.chunk.outputs .playgroundExamples }}
113142
114143 - uses : actions/upload-artifact@v4
115144 with :
116- name : results-${{ matrix. phpVersion }}-${{ matrix .chunkNumber }}
117- 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
118147
119148 evaluate :
120149 name : " Evaluate results"
@@ -130,11 +159,12 @@ jobs:
130159 uses : " shivammathur/setup-php@v2"
131160 with :
132161 coverage : " none"
133- php-version : " 8.3 "
162+ php-version : " 8.5 "
134163
135- - name : " Install Issue Bot dependencies"
136- working-directory : " issue-bot"
137- run : " composer install --no-interaction --no-progress"
164+ - name : " Install issue-bot dependencies"
165+ uses : " ramsey/composer-install@v3"
166+ with :
167+ working-directory : " issue-bot"
138168
139169 - uses : actions/download-artifact@v4
140170 with :
0 commit comments