18
18
# cron every week on monday
19
19
- cron : " 0 0 * * 1"
20
20
21
+ env :
22
+ UV_SYSTEM_PYTHON : 1
23
+
21
24
jobs :
22
25
test :
23
26
runs-on : ubuntu-latest
@@ -33,33 +36,34 @@ jobs:
33
36
- anyio-v3
34
37
- anyio-v4
35
38
fail-fast : false
36
-
37
39
steps :
38
40
- uses : actions/checkout@v4
39
41
- name : Set up Python
40
42
uses : actions/setup-python@v5
41
43
with :
42
44
python-version : ${{ matrix.python-version }}
45
+ - name : Setup uv
46
+ uses : astral-sh/setup-uv@v3
47
+ with :
48
+ version : " 0.4.15"
49
+ enable-cache : true
50
+ cache-dependency-glob : |
51
+ requirements**.txt
52
+ pyproject.toml
43
53
# Allow debugging with tmate
44
54
- name : Setup tmate session
45
55
uses : mxschmitt/action-tmate@v3
46
56
if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
47
57
with :
48
58
limit-access-to-actor : true
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') }}
54
59
- name : Install Dependencies
55
- if : steps.cache.outputs.cache-hit != 'true'
56
- run : pip install -r requirements-tests.txt
60
+ run : uv pip install -r requirements-tests.txt
57
61
- name : Install AnyIO v3
58
62
if : matrix.anyio-version == 'anyio-v3'
59
- run : pip install --upgrade "anyio>=3.4.0,<4.0"
63
+ run : uv pip install --upgrade "anyio>=3.4.0,<4.0"
60
64
- name : Install AnyIO v4
61
65
if : matrix.anyio-version == 'anyio-v4'
62
- run : pip install --upgrade "anyio>=4.0.0,<5.0"
66
+ run : uv pip install --upgrade "anyio>=4.0.0,<5.0"
63
67
- name : Lint
64
68
if : matrix.anyio-version == 'anyio-v4'
65
69
run : bash scripts/lint.sh
@@ -80,28 +84,31 @@ jobs:
80
84
needs :
81
85
- test
82
86
runs-on : ubuntu-latest
83
-
84
87
steps :
85
88
- uses : actions/checkout@v4
86
-
87
89
- uses : actions/setup-python@v5
88
90
with :
89
91
python-version : ' 3.8'
90
-
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
91
100
- name : Get coverage files
92
101
uses : actions/download-artifact@v4
93
102
with :
94
103
pattern : coverage-*
95
104
path : coverage
96
105
merge-multiple : true
97
-
98
- - run : pip install coverage[toml]
99
-
106
+ - name : Install Dependencies
107
+ run : uv pip install -r requirements-tests.txt
100
108
- run : ls -la coverage
101
109
- run : coverage combine coverage
102
110
- run : coverage report
103
111
- run : coverage html --title "Coverage for ${{ github.sha }}"
104
-
105
112
- name : Store coverage HTML
106
113
uses : actions/upload-artifact@v4
107
114
with :
0 commit comments