Skip to content

Commit 7f6ec9d

Browse files
authored
replace conda with uv
1 parent 236782c commit 7f6ec9d

1 file changed

Lines changed: 28 additions & 14 deletions

File tree

.github/workflows/tester.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,53 @@ on:
77
paths:
88
- '**.py'
99
- .github/workflows/tester.yml
10-
1110
pull_request:
1211
branches:
1312
- master
1413
paths:
1514
- '**.py'
1615
- .github/workflows/tester.yml
1716
workflow_dispatch:
17+
1818
jobs:
1919
continuous-integration:
2020
name: Continuous integration ${{ matrix.os }} python ${{ matrix.python-version }}
2121
runs-on: ${{ matrix.os }}
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
os: ${{ fromJSON(vars.BUILD_OS)}}
26-
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
25+
os: ${{ fromJSON(vars.BUILD_OS) }}
26+
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
27+
2728
steps:
2829
- uses: actions/checkout@v4
29-
- uses: conda-incubator/setup-miniconda@v3
3030

31+
# 1. Setup uv instantly (replaces the heavy setup-miniconda)
32+
- name: Set up uv
33+
uses: astral-sh/setup-uv@v3
3134
with:
32-
python-version: ${{ matrix.python }}
33-
- name: Installing dependencies
34-
shell: bash -l {0}
35-
run: |
36-
conda install -c conda-forge numpy scipy scikit-image scikit-learn pytest networkx osqp matplotlib -y
37-
- name: Building and install
38-
shell: bash -l {0}
35+
version: "latest"
36+
37+
# 2. Pin the exact Python version from your matrix variable
38+
- name: Set up Python ${{ matrix.matrix.python-version }}
39+
run: uv python install ${{ matrix.python-version }}
40+
41+
# 3. Create a clean virtual environment and install everything at once
42+
- name: Install dependencies and library
3943
run: |
40-
pip install . --user
41-
pip install geoh5py --user
44+
uv pip install --system \
45+
numpy \
46+
scipy \
47+
scikit-image \
48+
scikit-learn \
49+
pytest \
50+
networkx \
51+
osqp \
52+
matplotlib \
53+
geoh5py \
54+
-e .
55+
56+
# 4. Run pytest directly inside the environment
4257
- name: pytest
43-
shell: bash -l {0}
4458
run: |
4559
pytest

0 commit comments

Comments
 (0)