chore: update pre-commit hooks #1358
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: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| # macos-13 is an intel runner, macos-14 is an arm64 runner | |
| platform: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-13, macos-14] | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 # required for version resolution | |
| - name: Set up Conda | |
| uses: conda-incubator/setup-miniconda@v3.2.0 | |
| with: | |
| channels: conda-forge | |
| miniforge-version: latest | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install compilers | |
| run: conda install -y c-compiler cxx-compiler | |
| - name: Install clang | |
| if: matrix.platform == 'macos-13' | |
| run: conda install -y 'clang>=12.0.1,<17' | |
| - name: Show conda environment info | |
| run: | | |
| conda info | |
| conda config --show-sources | |
| conda list --show-channel-urls | |
| - name: Install numcodecs | |
| run: | | |
| export DISABLE_NUMCODECS_AVX2="" | |
| # TODO: Remove this conditional when pcodec supports Python 3.14 | |
| if [[ "${{ matrix.python-version }}" == "3.14" ]]; then | |
| python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy] | |
| else | |
| python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy] | |
| fi | |
| - name: List installed packages | |
| run: python -m pip list | |
| - name: Run tests | |
| shell: "bash -l {0}" | |
| run: pytest -v | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| test-zarr: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zarr-version: ["312", "313", "main"] | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 # required for version resolution | |
| - name: Set up Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.0 | |
| with: | |
| pixi-version: v0.49.0 | |
| cache: false | |
| - name: List installed packages | |
| shell: "bash -l {0}" | |
| run: pixi run ls-deps-${{matrix.zarr-version}} | |
| - name: Run tests with Zarr ${{ matrix.zarr-version }} | |
| shell: "bash -l {0}" | |
| run: pixi run test-zarr-${{ matrix.zarr-version }} | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true |