2323
2424jobs :
2525 test :
26- runs-on : ubuntu-latest
2726 strategy :
2827 matrix :
29- python-version :
30- - " 3.8"
31- - " 3.9"
32- - " 3.10"
33- - " 3.11"
34- - " 3.12"
28+ os : [ ubuntu-latest, macos-latest, windows-latest ]
29+ python-version : ["3.14"]
30+ uv-resolution :
31+ - highest
32+ include :
33+ - python-version : " 3.10"
34+ os : ubuntu-latest
35+ uv-resolution : lowest-direct
36+ - python-version : " 3.11"
37+ os : macos-latest
38+ uv-resolution : lowest-direct
39+ - python-version : " 3.12"
40+ os : windows-latest
41+ uv-resolution : highest
42+ - python-version : " 3.13"
43+ os : macos-latest
44+ uv-resolution : lowest-direct
3545 fail-fast : false
46+ runs-on : ${{ matrix.os }}
47+ env :
48+ UV_PYTHON : ${{ matrix.python-version }}
49+ UV_RESOLUTION : ${{ matrix.uv-resolution }}
3650 steps :
3751 - name : Dump GitHub context
3852 env :
3953 GITHUB_CONTEXT : ${{ toJson(github) }}
4054 run : echo "$GITHUB_CONTEXT"
4155 - uses : actions/checkout@v5
4256 - name : Set up Python
43- uses : actions/setup-python@v5
57+ uses : actions/setup-python@v6
4458 with :
4559 python-version : ${{ matrix.python-version }}
4660 # Issue ref: https://github.com/actions/setup-python/issues/436
4761 # cache: "pip"
4862 # cache-dependency-path: pyproject.toml
49- - uses : actions/cache@v4
50- id : cache
51- with :
52- path : ${{ env.pythonLocation }}
53- key : ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
63+ - name : Install uv
64+ uses : astral-sh/setup-uv@v7
5465 # Allow debugging with tmate
5566 - name : Setup tmate session
5667 uses : mxschmitt/action-tmate@v3
5768 if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
5869 with :
5970 limit-access-to-actor : true
6071 - name : Install Dependencies
61- if : steps.cache.outputs.cache-hit != 'true'
62- run : pip install -r requirements-tests.txt
63- - name : Lint
64- run : bash scripts/lint.sh
72+ run : uv sync --all-extras --dev
6573 - run : mkdir coverage
6674 - name : Test
67- run : bash scripts/test.sh
75+ run : uv run --no-sync bash scripts/test.sh
6876 env :
6977 COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
7078 CONTEXT : ${{ runner.os }}-py${{ matrix.python-version }}
7179 - name : Store coverage files
72- uses : actions/upload-artifact@v4
80+ uses : actions/upload-artifact@v5
7381 with :
74- name : coverage-${{ matrix.python-version }}
82+ name : coverage-${{ runner.os }}-${{ matrix.python-version }}
7583 path : coverage
7684 include-hidden-files : true
7785
@@ -84,29 +92,31 @@ jobs:
8492 GITHUB_CONTEXT : ${{ toJson(github) }}
8593 run : echo "$GITHUB_CONTEXT"
8694 - uses : actions/checkout@v5
87- - uses : actions/setup-python@v5
95+ - uses : actions/setup-python@v6
8896 with :
89- python-version : ' 3.8 '
97+ python-version-file : " pyproject.toml "
9098 # Issue ref: https://github.com/actions/setup-python/issues/436
9199 # cache: "pip"
92100 # cache-dependency-path: pyproject.toml
101+ - name : Install uv
102+ uses : astral-sh/setup-uv@v7
93103 - name : Get coverage files
94104 uses : actions/download-artifact@v6
95105 with :
96106 pattern : coverage-*
97107 path : coverage
98108 merge-multiple : true
99- - run : pip install coverage[toml]
109+ - run : uv sync --locked --all-extras --dev
100110 - run : ls -la coverage
101- - run : coverage combine coverage
102- - run : coverage report
103- - run : coverage html --title "Coverage for ${{ github.sha }}"
111+ - run : uv run coverage combine coverage
112+ - run : uv run coverage html --title "Coverage for ${{ github.sha }}"
104113 - name : Store coverage HTML
105- uses : actions/upload-artifact@v4
114+ uses : actions/upload-artifact@v5
106115 with :
107116 name : coverage-html
108117 path : htmlcov
109118 include-hidden-files : true
119+ - run : uv run coverage report --fail-under=100
110120
111121 # https://github.com/marketplace/actions/alls-green#why
112122 check : # This job does nothing and is only used for the branch protection
0 commit comments