-
Notifications
You must be signed in to change notification settings - Fork 92
83 lines (71 loc) · 2.18 KB
/
tests.yml
File metadata and controls
83 lines (71 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Tests
on:
pull_request:
push:
branches: [main, test]
merge_group:
jobs:
pre-commit:
name: Lint
uses: tskit-dev/.github/.github/workflows/lint.yml@v2
test:
name: Python
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [ 3.9, 3.13 ]
os: [ macos-latest, ubuntu-24.04, windows-latest ]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4.2.2
with:
submodules: true
- name: Install Conda (needed for GSL)
uses: conda-incubator/setup-miniconda@v3.1.1
with:
activate-environment: anaconda-client-env
python-version: ${{ matrix.python }}
channels: conda-forge, anaconda
channel-priority: strict
auto-update-conda: true
- name: Fix windows symlinks
# This is horrible, but the "git config core.symlinks true" didn't work.
if: matrix.os == 'windows-latest'
run: |
rm lwt_interface
cp -r --dereference git-submodules/tskit/python/lwt_interface ./lwt_interface
- name: Fix windows .profile
if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
run: |
cp ~/.bash_profile ~/.profile
- name: Install GSL
if: steps.cache.outputs.cache-hit != 'true'
shell: bash -l {0} #We need a login shell to get conda
run: conda install gsl
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.15"
- name: Install pip deps
shell: bash -l {0}
run: |
uv pip install -r pyproject.toml --extra test
- name: Build module
env:
MSP_CONDA_PREFIX: c:\Miniconda\envs\anaconda-client-env
run: |
source ~/.profile
conda activate anaconda-client-env
python setup.py build_ext --inplace
- name: Run tests
run: |
source ~/.profile
conda activate anaconda-client-env
pytest -xvs -n0