@@ -25,21 +25,28 @@ jobs:
2525 test :
2626 strategy :
2727 matrix :
28- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
29- pydantic-version : ["v2"]
28+ os : [ ubuntu-latest, macos-latest, windows-latest ]
29+ python-version : ["3.14"]
30+ uv-resolution :
31+ - highest
3032 include :
31- - python-version : " 3.8"
32- pydantic-version : " v1"
33- - python-version : " 3.9"
34- pydantic-version : " v1"
3533 - python-version : " 3.10"
36- pydantic-version : " v1"
34+ os : ubuntu-latest
35+ uv-resolution : lowest-direct
3736 - python-version : " 3.11"
38- pydantic-version : " v1"
37+ os : macos-latest
38+ uv-resolution : lowest-direct
3939 - python-version : " 3.12"
40- pydantic-version : " v1"
40+ os : windows-latest
41+ uv-resolution : highest
42+ - python-version : " 3.13"
43+ os : macos-latest
44+ uv-resolution : lowest-direct
4145 fail-fast : false
42- runs-on : ubuntu-latest
46+ runs-on : ${{ matrix.os }}
47+ env :
48+ UV_PYTHON : ${{ matrix.python-version }}
49+ UV_RESOLUTION : ${{ matrix.uv-resolution }}
4350 steps :
4451 - name : Dump GitHub context
4552 env :
@@ -62,22 +69,17 @@ jobs:
6269 with :
6370 limit-access-to-actor : true
6471 - name : Install Dependencies
65- run : uv sync --locked --all-extras --dev
66- - name : Install Pydantic v1
67- if : matrix.pydantic-version == 'v1'
68- run : uv pip install "pydantic<2.0.0"
69- - name : Lint
70- run : uv run --no-sync scripts/lint.sh
72+ run : uv sync --all-extras --dev
7173 - run : mkdir coverage
7274 - name : Test
73- run : uv run --no-sync scripts/test.sh
75+ run : uv run --no-sync bash scripts/test.sh
7476 env :
7577 COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
7678 CONTEXT : ${{ runner.os }}-py${{ matrix.python-version }}
7779 - name : Store coverage files
78- uses : actions/upload-artifact@v4
80+ uses : actions/upload-artifact@v5
7981 with :
80- name : coverage-${{ matrix.python-version }}-${{ matrix.pydantic -version }}
82+ name : coverage-${{ runner.os }}-${{ matrix.python -version }}
8183 path : coverage
8284 include-hidden-files : true
8385
@@ -96,23 +98,25 @@ jobs:
9698 # Issue ref: https://github.com/actions/setup-python/issues/436
9799 # cache: "pip"
98100 # cache-dependency-path: pyproject.toml
101+ - name : Install uv
102+ uses : astral-sh/setup-uv@v7
99103 - name : Get coverage files
100- uses : actions/download-artifact@v5
104+ uses : actions/download-artifact@v6
101105 with :
102106 pattern : coverage-*
103107 path : coverage
104108 merge-multiple : true
105- - run : pip install coverage[toml]
109+ - run : uv sync --locked --all-extras --dev
106110 - run : ls -la coverage
107- - run : coverage combine coverage
108- - run : coverage report
109- - 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 }}"
110113 - name : Store coverage HTML
111- uses : actions/upload-artifact@v4
114+ uses : actions/upload-artifact@v5
112115 with :
113116 name : coverage-html
114117 path : htmlcov
115118 include-hidden-files : true
119+ - run : uv run coverage report --fail-under=100
116120
117121 # https://github.com/marketplace/actions/alls-green#why
118122 check : # This job does nothing and is only used for the branch protection
0 commit comments