@@ -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 :
33- shard-index : [0, 1, 2, 3, 4]
31+ shard-index : [0, 1, 2, 3, 4, 5 ]
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
@@ -63,24 +63,40 @@ jobs:
6363 mypy_primer \
6464 --repo mypy_to_test \
6565 --new $GITHUB_SHA --old base_commit \
66- --num-shards 5 --shard-index ${{ matrix.shard-index }} \
66+ --num-shards 6 --shard-index ${{ matrix.shard-index }} \
6767 --debug \
6868 --additional-flags="--debug-serialize" \
6969 --output concise \
70+ --mypy-install-librt \
7071 | tee diff_${{ matrix.shard-index }}.txt
7172 ) || [ $? -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
73+ - if : ${{ matrix.shard-index == 0 }}
7874 name : Save PR number
7975 run : |
8076 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
77+ - name : Upload mypy_primer diff + PR number
78+ uses : actions/upload-artifact@v4
79+ if : ${{ matrix.shard-index == 0 }}
80+ with :
81+ name : mypy_primer_diffs-${{ matrix.shard-index }}
82+ path : |
83+ diff_${{ matrix.shard-index }}.txt
84+ pr_number.txt
85+ - name : Upload mypy_primer diff
86+ uses : actions/upload-artifact@v4
87+ if : ${{ matrix.shard-index != 0 }}
88+ with :
89+ name : mypy_primer_diffs-${{ matrix.shard-index }}
90+ path : diff_${{ matrix.shard-index }}.txt
91+
92+ join_artifacts :
93+ name : Join artifacts
94+ runs-on : ubuntu-latest
95+ needs : [mypy_primer]
96+ steps :
97+ - name : Merge artifacts
98+ uses : actions/upload-artifact/merge@v4
8499 with :
85100 name : mypy_primer_diffs
86- path : pr_number.txt
101+ pattern : mypy_primer_diffs-*
102+ delete-merged : true
0 commit comments