1818 # cron every week on monday
1919 - cron : " 0 0 * * 1"
2020
21+ env :
22+ UV_SYSTEM_PYTHON : 1
23+
2124jobs :
2225 test :
23- runs-on : ubuntu-latest
2426 strategy :
2527 matrix :
28+ os : [ ubuntu-latest ]
2629 python-version :
27- - " 3.7"
2830 - " 3.8"
2931 - " 3.9"
3032 - " 3.10"
3133 - " 3.11"
3234 - " 3.12"
35+ - " 3.13"
3336 pydantic-version :
3437 - pydantic-v1
3538 - pydantic-v2
3639 fail-fast : false
37-
40+ runs-on : ${{ matrix.os }}
3841 steps :
3942 - uses : actions/checkout@v4
4043 - name : Set up Python
4144 uses : actions/setup-python@v5
4245 with :
4346 python-version : ${{ matrix.python-version }}
47+ - name : Setup uv
48+ uses : astral-sh/setup-uv@v6
49+ with :
50+ version : " 0.4.15"
51+ enable-cache : true
52+ cache-dependency-glob : |
53+ requirements**.txt
54+ pyproject.toml
4455 # Allow debugging with tmate
4556 - name : Setup tmate session
4657 uses : mxschmitt/action-tmate@v3
4758 if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
4859 with :
4960 limit-access-to-actor : true
50- - uses : actions/cache@v4
51- id : cache
52- with :
53- path : ${{ env.pythonLocation }}
54- key : ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-v01
5561 - name : Install Dependencies
56- if : steps.cache.outputs.cache-hit != 'true'
57- run : pip install -r requirements-tests.txt
62+ run : uv pip install -r requirements-tests.txt
5863 - name : Install Pydantic v1
5964 if : matrix.pydantic-version == 'pydantic-v1'
60- run : pip install --upgrade "pydantic>=1.10.0,<2.0.0"
65+ run : uv pip install --upgrade "pydantic>=1.10.0,<2.0.0"
6166 - name : Install Pydantic v2
6267 if : matrix.pydantic-version == 'pydantic-v2'
63- run : pip install --upgrade "pydantic>=2.0.2,<3.0.0" "typing-extensions==4.6.1 "
68+ run : uv pip install --upgrade "pydantic>=2.0.2,<3.0.0"
6469 - name : Lint
65- # Do not run on Python 3.7 as mypy behaves differently
66- if : matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2'
70+ if : matrix.pydantic-version == 'pydantic-v2' && matrix.python-version != '3.8'
6771 run : bash scripts/lint.sh
6872 - run : mkdir coverage
6973 - name : Test
@@ -82,28 +86,31 @@ jobs:
8286 needs :
8387 - test
8488 runs-on : ubuntu-latest
85-
8689 steps :
8790 - uses : actions/checkout@v4
88-
8991 - uses : actions/setup-python@v5
9092 with :
91- python-version : ' 3.12'
92-
93+ python-version : ' 3.13'
94+ - name : Setup uv
95+ uses : astral-sh/setup-uv@v6
96+ with :
97+ version : " 0.4.15"
98+ enable-cache : true
99+ cache-dependency-glob : |
100+ requirements**.txt
101+ pyproject.toml
93102 - name : Get coverage files
94103 uses : actions/download-artifact@v4
95104 with :
96105 pattern : coverage-*
97106 path : coverage
98107 merge-multiple : true
99-
100- - run : pip install coverage[toml]
101-
108+ - name : Install Dependencies
109+ run : uv pip install -r requirements-tests.txt
102110 - run : ls -la coverage
103111 - run : coverage combine coverage
104112 - run : coverage report
105113 - run : coverage html --title "Coverage for ${{ github.sha }}"
106-
107114 - name : Store coverage HTML
108115 uses : actions/upload-artifact@v4
109116 with :
0 commit comments