Update readme for consistency across tskit-dev #231
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: 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.10", 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 uv and set the python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| version: "0.8.15" | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| uv pip install -r pyproject.toml --extra test | |
| - name: Run tests | |
| run: | | |
| uv run --no-sync python -m pytest -xv --cov=tszip --cov-report=xml --cov-branch -n2 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5.4.0 | |
| with: | |
| name: zarrv3 | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| - name: Run tests (zarr v2) | |
| if: ${{ matrix.python == '3.13' }} | |
| run: | | |
| uv pip install "zarr>=2.17,<3" | |
| uv run --no-sync python -m pytest -xv --cov=tszip --cov-report=xml --cov-branch -n2 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5.4.0 | |
| with: | |
| name: zarrv2 | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| zarr-compatibility: | |
| name: Zarr v2/v3 Cross-compatibility | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Install uv and set python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: 3.13 | |
| version: "0.8.15" | |
| - name: Install dependencies (zarr v3) | |
| run: | | |
| uv venv | |
| uv pip install -r pyproject.toml --extra test | |
| - name: Write test file with zarr v3 | |
| run: uv run --no-sync python tests/zarr_cross_version_helper.py write test_v3.tsz | |
| - name: Switch to zarr v2 and test reading | |
| run: | | |
| uv pip install "zarr>=2.17,<3" | |
| uv run --no-sync python tests/zarr_cross_version_helper.py read test_v3.tsz | |
| uv run --no-sync python tests/zarr_cross_version_helper.py write test_v2.tsz | |
| - name: Switch back to zarr v3 and test reading both files | |
| run: | | |
| uv pip install "zarr>=3.0,<4" | |
| uv run --no-sync python tests/zarr_cross_version_helper.py read test_v3.tsz | |
| uv run --no-sync python tests/zarr_cross_version_helper.py read test_v2.tsz |