14
14
15
15
env :
16
16
PYTHON_VERSION : " 3.11"
17
- POETRY_VERSION : " 2.0.1 "
17
+ UV_VERSION : " 0.7.13 "
18
18
19
19
jobs :
20
20
service-tests :
@@ -24,11 +24,10 @@ jobs:
24
24
HF_HOME : ${{ github.workspace }}/hf_cache
25
25
steps :
26
26
- name : Check out repository
27
- uses : actions/checkout@v3
27
+ uses : actions/checkout@v4
28
28
29
29
- name : Cache HuggingFace Models
30
- id : hf-cache
31
- uses : actions/cache@v3
30
+ uses : actions/cache@v4
32
31
with :
33
32
path : hf_cache
34
33
key : ${{ runner.os }}-hf-cache
@@ -38,20 +37,24 @@ jobs:
38
37
mkdir -p ~/.huggingface
39
38
echo '{"token":"${{ secrets.HF_TOKEN }}"}' > ~/.huggingface/token
40
39
41
- - name : Set up Python 3.11
42
- uses : actions/setup-python@v4
40
+ - name : Install Python
41
+ uses : actions/setup-python@v5
43
42
with :
44
43
python-version : ${{ env.PYTHON_VERSION }}
45
- cache : pip
46
44
47
- - name : Install Poetry
48
- uses : snok/install-poetry@v1
45
+ - name : Install uv
46
+ uses : astral-sh/setup-uv@v6
49
47
with :
50
- version : ${{ env.POETRY_VERSION }}
48
+ version : ${{ env.UV_VERSION }}
49
+ enable-cache : true
50
+ python-version : ${{ env.PYTHON_VERSION }} # sets UV_PYTHON
51
+ cache-dependency-glob : |
52
+ pyproject.toml
53
+ uv.lock
51
54
52
55
- name : Install dependencies
53
56
run : |
54
- poetry install --all-extras
57
+ uv sync --all-extras
55
58
56
59
- name : Authenticate to Google Cloud
57
60
uses : google-github-actions/auth@v1
61
64
- name : Run full test suite and prime the HF cache
62
65
env :
63
66
HF_TOKEN : ${{ secrets.HF_TOKEN }}
64
- HF_HOME : ${{ github.workspace }}/hf_cache
65
67
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
66
68
GCP_LOCATION : ${{ secrets.GCP_LOCATION }}
67
69
GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
@@ -87,45 +89,48 @@ jobs:
87
89
fail-fast : false
88
90
matrix :
89
91
# 3.11 tests are run in the service-tests job
90
- python-version : ["3.9", "3.10", 3.12, 3.13]
92
+ python-version : ["3.9", "3.10", " 3.12", " 3.13" ]
91
93
redis-py-version : ["5.x", "6.x"]
92
- redis-version : ["6.2.6-v9", "latest", "8.0.1"]
93
-
94
+ redis-version : ["6.2.6-v9", "latest", "8.0.2"]
94
95
steps :
95
96
- name : Check out repository
96
- uses : actions/checkout@v3
97
+ uses : actions/checkout@v4
97
98
98
99
- name : Cache HuggingFace Models
99
- uses : actions/cache@v3
100
+ uses : actions/cache@v4
100
101
with :
101
102
path : hf_cache
102
103
key : ${{ runner.os }}-hf-cache
103
104
104
- - name : Set up Python ${{ matrix.python-version }}
105
- uses : actions/setup-python@v4
105
+ - name : Install Python
106
+ uses : actions/setup-python@v5
106
107
with :
107
108
python-version : ${{ matrix.python-version }}
108
- cache : pip
109
109
110
- - name : Install Poetry
111
- uses : snok/install-poetry@v1
110
+ - name : Install uv
111
+ uses : astral-sh/setup-uv@v6
112
112
with :
113
- version : ${{ env.POETRY_VERSION }}
113
+ version : ${{ env.UV_VERSION }}
114
+ enable-cache : true
115
+ python-version : ${{ matrix.python-version }} # sets UV_PYTHON
116
+ cache-dependency-glob : |
117
+ pyproject.toml
118
+ uv.lock
114
119
115
120
- name : Install dependencies
116
121
run : |
117
- poetry install --all-extras
122
+ uv sync --all-extras
118
123
119
124
# Install right redis version based on redis py
120
125
if [[ "${{ matrix.redis-py-version }}" == "5.x" ]]; then
121
- poetry run pip install "redis>=5.0.0 ,<6.0.0 "
126
+ uv pip install "redis>=5,<6"
122
127
else
123
- poetry run pip install "redis>=6.0.0 ,<7.0.0 "
128
+ uv pip install "redis>=6,<7"
124
129
fi
125
130
126
131
- name : Set Redis image name
127
132
run : |
128
- if [[ "${{ matrix.redis-version }}" == "8.0.1 " ]]; then
133
+ if [[ "${{ matrix.redis-version }}" == "8.0.2 " ]]; then
129
134
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
130
135
else
131
136
echo "REDIS_IMAGE=redis/redis-stack-server:${{ matrix.redis-version }}" >> $GITHUB_ENV
@@ -138,7 +143,6 @@ jobs:
138
143
139
144
- name : Run tests
140
145
env :
141
- HF_HOME : ${{ github.workspace }}/hf_cache
142
146
GCP_LOCATION : ${{ secrets.GCP_LOCATION }}
143
147
GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
144
148
run : |
@@ -147,7 +151,6 @@ jobs:
147
151
- name : Run notebooks
148
152
if : matrix.redis-py-version == '6.x' && matrix.redis-version == 'latest'
149
153
env :
150
- HF_HOME : ${{ github.workspace }}/hf_cache
151
154
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
152
155
GCP_LOCATION : ${{ secrets.GCP_LOCATION }}
153
156
GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
@@ -171,20 +174,24 @@ jobs:
171
174
- name : Check out repository
172
175
uses : actions/checkout@v3
173
176
174
- - name : Set up Python
175
- uses : actions/setup-python@v4
177
+ - name : Install Python
178
+ uses : actions/setup-python@v5
176
179
with :
177
180
python-version : ${{ env.PYTHON_VERSION }}
178
- cache : pip
179
181
180
- - name : Install Poetry
181
- uses : snok/install-poetry@v1
182
+ - name : Install uv
183
+ uses : astral-sh/setup-uv@v6
182
184
with :
183
- version : ${{ env.POETRY_VERSION }}
184
-
185
+ version : ${{ env.UV_VERSION }}
186
+ enable-cache : true
187
+ python-version : ${{ env.PYTHON_VERSION }} # sets UV_PYTHON
188
+ cache-dependency-glob : |
189
+ pyproject.toml
190
+ uv.lock
191
+
185
192
- name : Install dependencies
186
193
run : |
187
- poetry install --all-extras
194
+ uv sync --group docs --frozen
188
195
189
196
- name : Build docs
190
197
run : |
0 commit comments