diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7e2bac06..7d4088fb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,6 +33,8 @@ jobs: channels: conda-forge miniforge-version: latest python-version: ${{ matrix.python-version }} + activate-environment: test + auto-activate-base: false - name: Install compilers run: conda install -y c-compiler cxx-compiler @@ -47,21 +49,29 @@ jobs: conda config --show-sources conda list --show-channel-urls + - name: Meson args - prefer Conda over system Python (Ubuntu) + if: startsWith(matrix.platform, 'ubuntu') + run: | + echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV + - name: Install numcodecs run: | # TODO: Remove this conditional when pcodec supports Python 3.14 if [[ "${{ matrix.python-version }}" == "3.14" ]]; then - python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]" + python -m pip install -v \ + ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]" \ + pytest else - python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]" + python -m pip install -v \ + ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]" \ + pytest fi - name: List installed packages run: python -m pip list - name: Run tests - shell: "bash -l {0}" - run: pytest -v + run: python -m pytest -v - uses: codecov/codecov-action@v5 with: @@ -99,10 +109,16 @@ jobs: channels: conda-forge miniforge-version: latest python-version: "3.13" + activate-environment: test + auto-activate-base: false - name: Install compilers run: conda install -y c-compiler cxx-compiler + - name: Meson args - prefer Conda over system Python (Ubuntu) + run: | + echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV + - name: Install numcodecs run: | if [[ -n "${{ matrix.extras }}" ]]; then @@ -115,7 +131,7 @@ jobs: run: python -m pip list - name: Run checksum tests - run: pytest -v tests/test_checksum32.py + run: python -m pytest -v tests/test_checksum32.py - uses: codecov/codecov-action@v5 with: @@ -153,18 +169,24 @@ jobs: channels: conda-forge miniforge-version: latest python-version: "3.13" + activate-environment: test + auto-activate-base: false - name: Install compilers run: conda install -y c-compiler cxx-compiler + - name: Meson args - prefer Conda over system Python (Ubuntu) + run: | + echo "MESONPY_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> $GITHUB_ENV + - name: Install numcodecs and Zarr run: | - python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c + python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c - name: List installed packages run: python -m pip list - name: Run Zarr integration tests - run: pytest tests/test_zarr3.py tests/test_zarr3_import.py + run: python -m pytest tests/test_zarr3.py tests/test_zarr3_import.py - uses: codecov/codecov-action@v5 with: