-
Notifications
You must be signed in to change notification settings - Fork 2
144 lines (119 loc) · 3.46 KB
/
Copy pathci.yml
File metadata and controls
144 lines (119 loc) · 3.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: CI
on:
merge_group:
pull_request:
push:
branches:
- main
schedule:
# At 04:44 on Monday, see https://crontab.guru/
- cron: "44 4 * * 1"
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- name: Install lint group
run: uv sync --locked --only-group lint
- name: Run prek
run: |
uv run --locked --only-group lint \
prek -c prek.toml run --all-files --show-diff-on-failure
python_test:
name: Python tests
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [macos-14, ubuntu-latest]
python-version: ["3.12", "3.13"]
exclude:
# Just run macos tests on one Python version
- os: macos-14
python-version: "3.13"
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Set up Miniconda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,bioconda
- name: Install conda test tools
run: conda install bcftools
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install test dependencies
run: |
uv sync --locked --group test --no-default-groups
- name: Run tests
run: |
uv run pytest
packaging:
name: Packaging
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- name: Install packaging deps
run: uv sync --locked --group packaging --no-default-groups
- name: Validate pyproject
run: uv run --locked --group packaging --no-default-groups validate-pyproject pyproject.toml -v
- name: Build artefacts
run: uv build
- name: Twine check
run: uv run --locked --group packaging --no-default-groups twine check --strict dist/*
- name: Install into venv
run: |
uv venv cli-test
uv pip install --python=cli-test dist/*.whl
- name: Check vczstore CLI
run: |
./cli-test/bin/vczstore --help
cd tests
../cli-test/bin/python -m vczstore --help
test-zarr-version:
name: Test Zarr versions
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
zarr-format: [2, 3]
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.12"
channels: conda-forge,bioconda
- name: Install conda test tools
run: conda install bcftools
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install test dependencies
run: |
uv sync --locked --group test --no-default-groups
- name: Run tests
run: |
uv run pytest
env:
BIO2ZARR_DEFAULT_ZARR_FORMAT: ${{ matrix.zarr-format }}