21
21
required : false
22
22
default : ' false'
23
23
24
+ env :
25
+ UV_SYSTEM_PYTHON : 1
26
+
24
27
jobs :
25
28
test :
26
29
runs-on : ubuntu-latest
@@ -43,23 +46,22 @@ jobs:
43
46
uses : actions/setup-python@v5
44
47
with :
45
48
python-version : ${{ matrix.python-version }}
46
- # Issue ref: https://github.com/actions/setup-python/issues/436
47
- # cache: "pip"
48
- # cache-dependency-path: pyproject.toml
49
- - uses : actions/cache@v4
50
- id : cache
49
+ - name : Setup uv
50
+ uses : astral-sh/setup-uv@v3
51
51
with :
52
- path : ${{ env.pythonLocation }}
53
- key : ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}
52
+ version : " 0.4.15"
53
+ enable-cache : true
54
+ cache-dependency-glob : |
55
+ requirements**.txt
56
+ pyproject.toml
54
57
# Allow debugging with tmate
55
58
- name : Setup tmate session
56
59
uses : mxschmitt/action-tmate@v3
57
60
if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
58
61
with :
59
62
limit-access-to-actor : true
60
63
- name : Install Dependencies
61
- if : steps.cache.outputs.cache-hit != 'true'
62
- run : pip install -r requirements-tests.txt
64
+ run : uv pip install -r requirements-tests.txt
63
65
- name : Lint
64
66
run : bash scripts/lint.sh
65
67
- run : mkdir coverage
@@ -87,16 +89,21 @@ jobs:
87
89
- uses : actions/setup-python@v5
88
90
with :
89
91
python-version : ' 3.8'
90
- # Issue ref: https://github.com/actions/setup-python/issues/436
91
- # cache: "pip"
92
- # cache-dependency-path: pyproject.toml
92
+ - name : Setup uv
93
+ uses : astral-sh/setup-uv@v3
94
+ with :
95
+ version : " 0.4.15"
96
+ enable-cache : true
97
+ cache-dependency-glob : |
98
+ requirements**.txt
99
+ pyproject.toml
93
100
- name : Get coverage files
94
101
uses : actions/download-artifact@v4
95
102
with :
96
103
pattern : coverage-*
97
104
path : coverage
98
105
merge-multiple : true
99
- - run : pip install coverage[toml]
106
+ - run : uv pip install -r requirements-tests.txt
100
107
- run : ls -la coverage
101
108
- run : coverage combine coverage
102
109
- run : coverage report
0 commit comments