Skip to content

CI

CI #239

Workflow file for this run

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 }}