refactor: use lower-level metadata models in zarr-python #96
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: | |
| 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Sync test dependency group | |
| run: uv sync --group test --python ${{ matrix.python-version }} | |
| - name: Run pytest | |
| run: uv run --group test pytest tests | |
| ruff: | |
| name: ruff | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: packages/zarr-metadata | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.11 | |
| - name: Sync test dependency group | |
| run: uv sync --group test --python 3.11 | |
| - name: Run pyright | |
| # Pinned to the last version that types PEP 661 sentinels in class | |
| # attributes correctly; 1.1.405+ regressed (microsoft/pyright#11115). | |
| # Unpin when the fix lands. | |
| run: uv run --group test --with 'pyright==1.1.404' 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! |