Skip to content

Commit a4b7cd6

Browse files
committed
Simplify test setup
1 parent a4d801c commit a4b7cd6

1 file changed

Lines changed: 17 additions & 27 deletions

File tree

.github/workflows/tests.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ jobs:
3232
with:
3333
submodules: true
3434

35-
- name: Install Conda (needed for GSL)
36-
uses: conda-incubator/setup-miniconda@v3.1.1
37-
with:
38-
activate-environment: anaconda-client-env
39-
python-version: ${{ matrix.python }}
40-
channels: conda-forge, anaconda
41-
channel-priority: strict
42-
auto-update-conda: true
4335

4436
- name: Fix windows symlinks
4537
# This is horrible, but the "git config core.symlinks true" didn't work.
@@ -48,36 +40,34 @@ jobs:
4840
rm lwt_interface
4941
cp -r --dereference git-submodules/tskit/python/lwt_interface ./lwt_interface
5042
51-
- name: Fix windows .profile
52-
if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
53-
run: |
54-
cp ~/.bash_profile ~/.profile
55-
56-
- name: Install GSL
57-
if: steps.cache.outputs.cache-hit != 'true'
58-
shell: bash -l {0} #We need a login shell to get conda
59-
run: conda install gsl
43+
- name: Install GSL (macOS)
44+
if: matrix.os == 'macos-latest'
45+
run: brew install gsl
46+
47+
- name: Install GSL (Windows)
48+
if: matrix.os == 'windows-latest'
49+
run: vcpkg install gsl:x64-windows
50+
shell: cmd
51+
52+
- name: Install GSL (Ubuntu)
53+
if: matrix.os == 'ubuntu-24.04'
54+
run: sudo apt-get update && sudo apt-get install -y libgsl-dev
6055

61-
- name: Install uv
56+
- name: Install uv and set the python version
6257
uses: astral-sh/setup-uv@v6
6358
with:
59+
python-version: ${{ matrix.python }}
6460
version: "0.8.15"
6561

6662
- name: Install pip deps
67-
shell: bash -l {0}
6863
run: |
64+
uv venv
6965
uv pip install -r pyproject.toml --extra test
7066
7167
- name: Build module
72-
env:
73-
MSP_CONDA_PREFIX: c:\Miniconda\envs\anaconda-client-env
7468
run: |
75-
source ~/.profile
76-
conda activate anaconda-client-env
77-
python setup.py build_ext --inplace
69+
uv run --no-sync python setup.py build_ext --inplace
7870
7971
- name: Run tests
8072
run: |
81-
source ~/.profile
82-
conda activate anaconda-client-env
83-
pytest -xvs -n0
73+
uv run --no-sync pytest -xvs -n0

0 commit comments

Comments
 (0)