refactor: bring in types from zarr-metadata #47
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: zarr-metadata | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/zarr-metadata/**' | |
| - '.github/workflows/zarr-metadata.yml' | |
| pull_request: | |
| paths: | |
| - 'packages/zarr-metadata/**' | |
| - '.github/workflows/zarr-metadata.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # zarr-metadata CI installs zarr-metadata standalone, not as a uv | |
| # workspace member. The workspace at the repo root forces uv to honor | |
| # `requires-python = ">=3.12"` from zarr-python's pyproject.toml, which | |
| # blocks Python 3.11 even though zarr-metadata itself supports 3.11+. | |
| # Using `uv venv` + `uv pip install` from a tmp directory bypasses | |
| # workspace resolution and tests zarr-metadata the way downstream users | |
| # actually install it: as a standalone package from PyPI. | |
| test: | |
| name: pytest py=${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-metadata | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: Create standalone Python ${{ matrix.python-version }} venv | |
| # Place the venv outside the workspace tree so uv doesn't try | |
| # to resolve workspace-wide requirements. | |
| run: uv venv "$RUNNER_TEMP/zm-venv" --python ${{ matrix.python-version }} --seed | |
| - name: Install zarr-metadata and test deps | |
| run: | | |
| uv pip install \ | |
| --python "$RUNNER_TEMP/zm-venv/bin/python" \ | |
| --group pyproject.toml:test \ | |
| . | |
| - name: Run pytest | |
| run: '"$RUNNER_TEMP/zm-venv/bin/python" -m pytest tests' | |
| ruff: | |
| name: ruff | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-metadata | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Run ruff | |
| run: uvx ruff check . | |
| pyright: | |
| name: pyright | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-metadata | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| enable-cache: true | |
| - name: Create standalone Python 3.11 venv | |
| run: uv venv "$RUNNER_TEMP/zm-venv" --python 3.11 --seed | |
| - name: Install zarr-metadata and test deps | |
| run: | | |
| uv pip install \ | |
| --python "$RUNNER_TEMP/zm-venv/bin/python" \ | |
| --group pyproject.toml:test \ | |
| . | |
| - name: Run pyright | |
| run: uvx --python "$RUNNER_TEMP/zm-venv/bin/python" pyright src | |
| zarr-metadata-complete: | |
| name: zarr-metadata complete | |
| needs: [test, ruff, pyright] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check failure | |
| if: | | |
| contains(needs.*.result, 'failure') || | |
| contains(needs.*.result, 'cancelled') | |
| run: exit 1 | |
| - name: Success | |
| run: echo Success! |