@@ -26,20 +26,20 @@ jobs:
2626 mypy_primer :
2727 name : Run mypy_primer
2828 runs-on : ubuntu-latest
29- permissions :
30- contents : read
3129 strategy :
3230 matrix :
3331 shard-index : [0, 1, 2, 3, 4]
3432 fail-fast : false
33+ timeout-minutes : 60
3534 steps :
3635 - uses : actions/checkout@v4
3736 with :
3837 path : mypy_to_test
3938 fetch-depth : 0
39+ persist-credentials : false
4040 - uses : actions/setup-python@v5
4141 with :
42- python-version : " 3.12 "
42+ python-version : " 3.13 "
4343 - name : Install dependencies
4444 run : |
4545 python -m pip install -U pip
@@ -69,18 +69,33 @@ jobs:
6969 --output concise \
7070 | tee diff_${{ matrix.shard-index }}.txt
7171 ) || [ $? -eq 1 ]
72- - name : Upload mypy_primer diff
73- uses : actions/upload-artifact@v3
74- with :
75- name : mypy_primer_diffs
76- path : diff_${{ matrix.shard-index }}.txt
77- - if : ${{ matrix.shard-index }} == 0
72+ - if : ${{ matrix.shard-index == 0 }}
7873 name : Save PR number
7974 run : |
8075 echo ${{ github.event.pull_request.number }} | tee pr_number.txt
81- - if : ${{ matrix.shard-index }} == 0
82- name : Upload PR number
83- uses : actions/upload-artifact@v3
76+ - name : Upload mypy_primer diff + PR number
77+ uses : actions/upload-artifact@v4
78+ if : ${{ matrix.shard-index == 0 }}
79+ with :
80+ name : mypy_primer_diffs-${{ matrix.shard-index }}
81+ path : |
82+ diff_${{ matrix.shard-index }}.txt
83+ pr_number.txt
84+ - name : Upload mypy_primer diff
85+ uses : actions/upload-artifact@v4
86+ if : ${{ matrix.shard-index != 0 }}
87+ with :
88+ name : mypy_primer_diffs-${{ matrix.shard-index }}
89+ path : diff_${{ matrix.shard-index }}.txt
90+
91+ join_artifacts :
92+ name : Join artifacts
93+ runs-on : ubuntu-latest
94+ needs : [mypy_primer]
95+ steps :
96+ - name : Merge artifacts
97+ uses : actions/upload-artifact/merge@v4
8498 with :
8599 name : mypy_primer_diffs
86- path : pr_number.txt
100+ pattern : mypy_primer_diffs-*
101+ delete-merged : true
0 commit comments