@@ -34,17 +34,21 @@ jobs:
34
34
cache : ' pip'
35
35
- name : Install uv
36
36
run : curl -LsSf https://astral.sh/uv/install.sh | sh
37
- - name : Install dependencies
38
- run : uv pip install -e ".[dev]"
37
+ - name : Setup environment and install dependencies
38
+ run : |
39
+ uv venv
40
+ source .venv/bin/activate
41
+ uv pip install -e ".[dev]"
39
42
40
43
- name : Run Pytest with Coverage (Fast Tests Only)
41
44
timeout-minutes : 60
42
45
env :
43
46
GCP_GSM_CREDENTIALS : ${{ secrets.GCP_GSM_CREDENTIALS }}
44
- run : >
45
- uv run coverage run -m pytest
46
- --durations=5 --exitfirst
47
- -m "not slow and not requires_creds and not linting and not flaky"
47
+ run : |
48
+ source .venv/bin/activate
49
+ uv run coverage run -m pytest \
50
+ --durations=5 --exitfirst \
51
+ -m "not slow and not requires_creds and not linting and not flaky"
48
52
49
53
- name : Run Pytest with Coverage (Flaky Tests Only)
50
54
timeout-minutes : 60
@@ -58,11 +62,14 @@ jobs:
58
62
59
63
- name : Print Coverage Report
60
64
if : always()
61
- run : uv run coverage report
65
+ run : |
66
+ source .venv/bin/activate
67
+ uv run coverage report
62
68
63
69
- name : Create Coverage Artifacts
64
70
if : always()
65
71
run : |
72
+ source .venv/bin/activate
66
73
uv run coverage html -d htmlcov
67
74
uv run coverage xml -o htmlcov/coverage.xml
68
75
@@ -87,19 +94,23 @@ jobs:
87
94
cache : ' pip'
88
95
- name : Install uv
89
96
run : curl -LsSf https://astral.sh/uv/install.sh | sh
90
- - name : Install dependencies
91
- run : uv pip install -e ".[dev]"
97
+ - name : Setup environment and install dependencies
98
+ run : |
99
+ uv venv
100
+ source .venv/bin/activate
101
+ uv pip install -e ".[dev]"
92
102
93
103
# Job-specific step(s):
94
104
- name : Run Pytest (No-Creds)
95
105
timeout-minutes : 60
96
106
env :
97
107
# Force this to a blank value.
98
108
GCP_GSM_CREDENTIALS : " "
99
- run : >
100
- uv run coverage run -m pytest
101
- --durations=5 --exitfirst
102
- -m "not requires_creds and not linting and not super_slow and not flaky"
109
+ run : |
110
+ source .venv/bin/activate
111
+ uv run coverage run -m pytest \
112
+ --durations=5 --exitfirst \
113
+ -m "not requires_creds and not linting and not super_slow and not flaky"
103
114
104
115
- name : Print Coverage Report
105
116
if : always()
@@ -152,18 +163,22 @@ jobs:
152
163
cache : ' pip'
153
164
- name : Install uv
154
165
run : curl -LsSf https://astral.sh/uv/install.sh | sh
155
- - name : Install dependencies
156
- run : uv pip install -e ".[dev]"
166
+ - name : Setup environment and install dependencies
167
+ run : |
168
+ uv venv
169
+ source .venv/bin/activate
170
+ uv pip install -e ".[dev]"
157
171
158
172
# Job-specific step(s):
159
173
- name : Run Pytest
160
174
timeout-minutes : 60
161
175
env :
162
176
GCP_GSM_CREDENTIALS : ${{ secrets.GCP_GSM_CREDENTIALS }}
163
- run : >
164
- uv run coverage run -m pytest
165
- --verbose
166
- -m "not linting and not super_slow and not flaky"
177
+ run : |
178
+ source .venv/bin/activate
179
+ uv run coverage run -m pytest \
180
+ --verbose \
181
+ -m "not linting and not super_slow and not flaky"
167
182
168
183
- name : Print Coverage Report
169
184
if : always()
@@ -195,10 +210,14 @@ jobs:
195
210
cache : ' pip'
196
211
- name : Install uv
197
212
run : curl -LsSf https://astral.sh/uv/install.sh | sh
198
- - name : Install dependencies
199
- run : uv pip install -e ".[dev]"
213
+ - name : Setup environment and install dependencies
214
+ run : |
215
+ uv venv
216
+ source .venv/bin/activate
217
+ uv pip install -e ".[dev]"
200
218
201
219
# Job-specific step(s):
202
220
- name : Run Deptry
203
221
run : |
222
+ source .venv/bin/activate
204
223
uv run deptry .
0 commit comments