Skip to content

Commit 37db00a

Browse files
committed
Use uv instead of pip
Signed-off-by: Keith Battocchi <[email protected]>
1 parent be78759 commit 37db00a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,18 @@ jobs:
139139
uses: actions/setup-python@v5
140140
with:
141141
python-version: ${{ matrix.version }}
142-
- name: Ensure latest pip and setuptools
143-
run: python -m pip install --upgrade pip && pip install --upgrade setuptools
142+
- name: Install uv
143+
# check if we're running on windows
144+
run: ${{ runner.os == 'Windows' && 'irm https://astral.sh/uv/install.ps1 | iex' || 'curl -LsSf https://astral.sh/uv/install.sh | sh' }}
144145
- name: Install graphviz
145146
run: sudo apt-get -yq install graphviz
146147
if: ${{ matrix.install_graphviz }}
147148
# Add verbose flag to pip installation if in debug mode
148149
- name: Install econml
149-
run: pip install -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg-notebook.txt' }}
150+
run: uv pip install --system -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg-notebook.txt' }}
150151
# Install notebook requirements (if not already done as part of lkg)
151152
- name: Install notebook requirements
152-
run: pip install jupyter jupyter-client nbconvert nbformat seaborn xgboost tqdm
153+
run: uv pip install --system jupyter jupyter-client nbconvert nbformat seaborn xgboost tqdm
153154
if: ${{ !env.use_lkg }}
154155
- name: Save installed packages
155156
run: pip freeze --exclude-editable > notebooks-${{ env.id_string }}-requirements.txt
@@ -159,7 +160,7 @@ jobs:
159160
name: requirements
160161
path: notebooks-${{ env.id_string }}-requirements.txt
161162
- name: Install pytest
162-
run: pip install pytest pytest-runner coverage
163+
run: uv pip install --system pytest pytest-runner coverage
163164

164165
- name: Run notebook tests
165166
run: python setup.py pytest
@@ -244,11 +245,12 @@ jobs:
244245
uses: actions/setup-python@v5
245246
with:
246247
python-version: ${{ matrix.python-version }}
247-
- name: Ensure latest pip and setuptools
248-
run: python -m pip install --upgrade pip && pip install --upgrade setuptools
248+
- name: Install uv
249+
# check if we're running on windows
250+
run: ${{ runner.os == 'Windows' && 'irm https://astral.sh/uv/install.ps1 | iex' || 'curl -LsSf https://astral.sh/uv/install.sh | sh' }}
249251
# Add verbose flag to pip installation if in debug mode
250252
- name: Install econml
251-
run: pip install -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg.txt' }}
253+
run: uv pip install --system -e .${{ matrix.extras }} ${{ fromJSON('["","-v"]')[runner.debug] }} ${{ env.use_lkg && '-r lkg.txt' }}
252254
- name: Save installed packages
253255
run: pip freeze --exclude-editable > tests-${{ env.id_string }}-requirements.txt
254256
- name: Upload installed packages
@@ -257,7 +259,7 @@ jobs:
257259
name: requirements
258260
path: tests-${{ env.id_string }}-requirements.txt
259261
- name: Install pytest
260-
run: pip install pytest pytest-runner coverage
262+
run: uv pip install --system pytest pytest-runner coverage
261263
- name: Run tests
262264
run: python setup.py pytest
263265
id: run_tests

0 commit comments

Comments
 (0)