-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (48 loc) · 1.46 KB
/
python.yml
File metadata and controls
52 lines (48 loc) · 1.46 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
on:
push:
branches: [main, dev]
pull_request:
name: Python data round trips
jobs:
test-metadata:
name: Test Python metadata round trips
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
rust:
- stable
python: [ "3.13" ]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v6.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2.8.2
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
version: "latest"
python-version: ${{ matrix.python }}
- name: run JSON metadata example
run: |
cargo run --example json_metadata --features derive
- name: run bincode metadata example
run: |
cargo run --example bincode_metadata --features derive
- name: setup Python and run tests
run: |
uv venv -p ${{ matrix.python }} test_venv
source test_venv/bin/activate
uv pip install -r python/requirements_locked_3_13.txt
uv pip install python/tskit_glue
python -m pytest python
rm -rf test_venv