Direct Zarr IO #693
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| merge_group: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| # At 04:44 on Monday, see https://crontab.guru/ | |
| - cron: "44 4 * * 1" | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| with: | |
| python-version: "3.11" | |
| - 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 }} | |
| strategy: | |
| matrix: | |
| os: [macos-14, ubuntu-latest, windows-latest] | |
| python-version: ["3.11", "3.13"] | |
| exclude: | |
| # There's a bug in Pyranges which means we need to avoid Windows/3.11 | |
| # https://github.com/sgkit-dev/vcztools/issues/290 | |
| - os: windows-latest | |
| python-version: "3.11" | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install bcftools and plink2 (Linux only) | |
| # The bcftools and plink2 validation test files skip cleanly | |
| # via shutil.which on platforms without these binaries, so | |
| # the install runs on Linux only; macOS and Windows leave | |
| # the validation suites as no-ops. | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y bcftools plink2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install test dependencies | |
| run: | | |
| uv sync --locked --group test --no-default-groups | |
| # Build the extension module in-place so pytest can find it | |
| uv run python setup.py build_ext --inplace | |
| - name: Run tests | |
| run: | | |
| uv run pytest --cov=vcztools --cov-report=term-missing | |
| c_python_test: | |
| name: CPython interface tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcovr | |
| - name: Install python dependencies | |
| run: uv sync --locked --group test --no-default-groups | |
| - name: Build module with coverage | |
| run: | | |
| # Build the extension module in-place so pytest can find it | |
| CFLAGS="--coverage" uv run python setup.py build_ext --inplace | |
| - name: Run tests | |
| run: | | |
| uv run pytest -vs tests/test_cpython_interface.py | |
| - name: Show coverage | |
| run: | | |
| gcovr --filter vcztools | |
| c_test: | |
| name: C tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build libcunit1-dev valgrind meson gcovr | |
| - name: Build | |
| working-directory: ./lib | |
| run: | | |
| meson setup -Db_coverage=true build | |
| - name: Tests | |
| working-directory: ./lib | |
| run: | | |
| ninja -C build test | |
| - name: Show coverage | |
| working-directory: ./lib | |
| run: | | |
| ninja -C build coverage-text | |
| cat build/meson-logs/coverage.txt | |
| - name: Valgrind | |
| working-directory: ./lib | |
| run: | | |
| valgrind --leak-check=full --error-exitcode=1 ./build/tests | |
| packaging: | |
| name: Packaging | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| 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 vcztools CLI | |
| run: | | |
| ./cli-test/bin/vcztools --help | |
| cd tests | |
| ../cli-test/bin/python -m vcztools --help | |
| test-azure-emulator: | |
| name: Test Azure emulator | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "22" | |
| - name: Install Azurite | |
| run: npm install -g azurite | |
| - name: Install test dependencies | |
| run: | | |
| uv sync --locked --group test --no-default-groups | |
| - name: Run Azure Icechunk test | |
| run: | | |
| uv run pytest -q tests/test_azure.py |