1515 - ' mypy/test/**'
1616 - ' test-data/**'
1717
18+ permissions :
19+ contents : read
20+
1821concurrency :
1922 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2023 cancel-in-progress : true
@@ -23,20 +26,20 @@ jobs:
2326 mypy_primer :
2427 name : Run mypy_primer
2528 runs-on : ubuntu-latest
26- permissions :
27- contents : read
2829 strategy :
2930 matrix :
30- shard-index : [0, 1, 2, 3, 4]
31+ shard-index : [0, 1, 2, 3, 4, 5 ]
3132 fail-fast : false
33+ timeout-minutes : 60
3234 steps :
33- - uses : actions/checkout@v3
35+ - uses : actions/checkout@v4
3436 with :
3537 path : mypy_to_test
3638 fetch-depth : 0
37- - uses : actions/setup-python@v4
39+ persist-credentials : false
40+ - uses : actions/setup-python@v5
3841 with :
39- python-version : " 3.10 "
42+ python-version : " 3.13 "
4043 - name : Install dependencies
4144 run : |
4245 python -m pip install -U pip
@@ -60,24 +63,40 @@ jobs:
6063 mypy_primer \
6164 --repo mypy_to_test \
6265 --new $GITHUB_SHA --old base_commit \
63- --num-shards 5 --shard-index ${{ matrix.shard-index }} \
66+ --num-shards 6 --shard-index ${{ matrix.shard-index }} \
6467 --debug \
6568 --additional-flags="--debug-serialize" \
6669 --output concise \
70+ --mypy-install-librt \
6771 | tee diff_${{ matrix.shard-index }}.txt
6872 ) || [ $? -eq 1 ]
69- - name : Upload mypy_primer diff
70- uses : actions/upload-artifact@v3
71- with :
72- name : mypy_primer_diffs
73- path : diff_${{ matrix.shard-index }}.txt
74- - if : ${{ matrix.shard-index }} == 0
73+ - if : ${{ matrix.shard-index == 0 }}
7574 name : Save PR number
7675 run : |
7776 echo ${{ github.event.pull_request.number }} | tee pr_number.txt
78- - if : ${{ matrix.shard-index }} == 0
79- name : Upload PR number
80- 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
8199 with :
82100 name : mypy_primer_diffs
83- path : pr_number.txt
101+ pattern : mypy_primer_diffs-*
102+ delete-merged : true
0 commit comments