@@ -13,67 +13,81 @@ concurrency:
1313jobs :
1414 tests :
1515 name : Python ${{ matrix.python-version }}
16- runs-on : ubuntu-20 .04
16+ runs-on : ubuntu-24 .04
1717
1818 strategy :
1919 matrix :
2020 python-version :
21- - 3.8
22- - 3.9
23- - ' 3.10'
24- - ' 3.11'
21+ - 3.8
22+ - 3.9
23+ - ' 3.10'
24+ - ' 3.11'
25+ - ' 3.12'
26+ - ' 3.13'
2527
2628 steps :
27- - uses : actions/checkout@v4
29+ - uses : actions/checkout@v4
2830
29- - uses : actions/setup-python@v5
30- with :
31- python-version : ${{ matrix.python-version }}
32- cache : pip
33- cache-dependency-path : ' requirements/*.txt'
31+ - uses : actions/setup-python@v5
32+ with :
33+ python-version : ${{ matrix.python-version }}
34+ allow-prereleases : true
3435
35- - name : Install dependencies
36- run : |
37- python -m pip install --upgrade pip setuptools wheel
38- python -m pip install --upgrade tox tox-py
36+ - name : Install uv
37+ uses : astral-sh/setup-uv@v3
38+ with :
39+ enable-cache : true
40+ cache-dependency-glob : tests/requirements/*.txt
3941
40- - name : Run tox targets for ${{ matrix.python-version }}
41- run : tox --py current
42+ - name : Install dependencies
43+ run : uv pip install --system tox tox-uv
4244
43- - name : Upload coverage data
44- uses : actions/upload-artifact@v3
45- with :
46- name : coverage-data
47- path : ' .coverage.*'
45+ - name : Run tox targets for ${{ matrix.python-version }}
46+ run : tox run -f py$(echo ${{ matrix.python-version }} | tr -d .)
47+
48+ - name : Upload coverage data
49+ uses : actions/upload-artifact@v4
50+ with :
51+ name : coverage-data-${{ matrix.python-version }}
52+ path : ' ${{ github.workspace }}/.coverage.*'
53+ include-hidden-files : true
54+ if-no-files-found : error
4855
4956 coverage :
5057 name : Coverage
51- runs-on : ubuntu-20 .04
58+ runs-on : ubuntu-24 .04
5259 needs : tests
5360 steps :
5461 - uses : actions/checkout@v4
5562
5663 - uses : actions/setup-python@v5
5764 with :
58- python-version : ' 3.10'
65+ python-version : ' 3.12'
66+
67+ - name : Install uv
68+ uses : astral-sh/setup-uv@v3
5969
6070 - name : Install dependencies
61- run : python -m pip install --upgrade coverage[toml]
71+ run : uv pip install --system coverage[toml]
6272
6373 - name : Download data
64- uses : actions/download-artifact@v2
74+ uses : actions/download-artifact@v4
6575 with :
66- name : coverage-data
76+ path : ${{ github.workspace }}
77+ pattern : coverage-data-*
78+ merge-multiple : true
6779
68- - name : Combine coverage
80+ - name : Combine coverage and fail if it's <96%
6981 run : |
7082 python -m coverage combine
7183 python -m coverage html --skip-covered --skip-empty
72- python -m coverage report
84+ python -m coverage report --fail-under=96
85+ echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
86+ python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
7387
7488 - name : Upload HTML report
7589 if : ${{ failure() }}
76- uses : actions/upload-artifact@v3
90+ uses : actions/upload-artifact@v4
7791 with :
7892 name : html-report
7993 path : htmlcov
0 commit comments