@@ -25,63 +25,61 @@ 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 :
4653 GITHUB_CONTEXT : ${{ toJson(github) }}
4754 run : echo "$GITHUB_CONTEXT"
4855 - uses : actions/checkout@v5
4956 - name : Set up Python
50- uses : actions/setup-python@v5
57+ uses : actions/setup-python@v6
5158 with :
5259 python-version : ${{ matrix.python-version }}
5360 # Issue ref: https://github.com/actions/setup-python/issues/436
5461 # cache: "pip"
5562 # cache-dependency-path: pyproject.toml
56- - uses : actions/cache@v4
57- id : cache
58- with :
59- path : ${{ env.pythonLocation }}
60- key : ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-{{ matrix.pydantic-version }}
63+ - name : Install uv
64+ uses : astral-sh/setup-uv@v7
6165 # Allow debugging with tmate
6266 - name : Setup tmate session
6367 uses : mxschmitt/action-tmate@v3
6468 if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
6569 with :
6670 limit-access-to-actor : true
6771 - name : Install Dependencies
68- if : steps.cache.outputs.cache-hit != 'true'
69- run : pip install -r requirements-tests.txt
70- - name : Install Pydantic v1
71- if : matrix.pydantic-version == 'v1'
72- run : pip install "pydantic<2.0.0"
73- - name : Lint
74- run : bash scripts/lint.sh
72+ run : uv sync --all-extras --dev
7573 - run : mkdir coverage
7674 - name : Test
77- run : bash scripts/test.sh
75+ run : uv run --no-sync bash scripts/test.sh
7876 env :
7977 COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
8078 CONTEXT : ${{ runner.os }}-py${{ matrix.python-version }}
8179 - name : Store coverage files
82- uses : actions/upload-artifact@v4
80+ uses : actions/upload-artifact@v5
8381 with :
84- name : coverage-${{ matrix.python-version }}-${{ matrix.pydantic -version }}
82+ name : coverage-${{ runner.os }}-${{ matrix.python -version }}
8583 path : coverage
8684 include-hidden-files : true
8785
@@ -94,29 +92,31 @@ jobs:
9492 GITHUB_CONTEXT : ${{ toJson(github) }}
9593 run : echo "$GITHUB_CONTEXT"
9694 - uses : actions/checkout@v5
97- - uses : actions/setup-python@v5
95+ - uses : actions/setup-python@v6
9896 with :
99- python-version : ' 3.8 '
97+ python-version-file : " pyproject.toml "
10098 # Issue ref: https://github.com/actions/setup-python/issues/436
10199 # cache: "pip"
102100 # cache-dependency-path: pyproject.toml
101+ - name : Install uv
102+ uses : astral-sh/setup-uv@v7
103103 - name : Get coverage files
104104 uses : actions/download-artifact@v5
105105 with :
106106 pattern : coverage-*
107107 path : coverage
108108 merge-multiple : true
109- - run : pip install coverage[toml]
109+ - run : uv sync --locked --all-extras --dev
110110 - run : ls -la coverage
111- - run : coverage combine coverage
112- - run : coverage report
113- - 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 }}"
114113 - name : Store coverage HTML
115- uses : actions/upload-artifact@v4
114+ uses : actions/upload-artifact@v5
116115 with :
117116 name : coverage-html
118117 path : htmlcov
119118 include-hidden-files : true
119+ - run : uv run coverage report --fail-under=100
120120
121121 # https://github.com/marketplace/actions/alls-green#why
122122 check : # This job does nothing and is only used for the branch protection
0 commit comments