(fix): small fix for new xarray + test deps #1
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "[0-9]+.[0-9]+.x" | |
| pull_request: | |
| env: | |
| PYTEST_ADDOPTS: "-v --color=yes" | |
| FORCE_COLOR: "1" | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| # Cancel the job if new commits are pushed | |
| # https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: '3.13' | |
| test-type: coverage | |
| - python-version: '3.11' | |
| test-type: standard | |
| - python-version: '3.13' | |
| dependencies-version: pre-release | |
| test-type: strict-warning | |
| - python-version: '3.11' | |
| dependencies-version: minimum | |
| test-type: coverage | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: pyproject.toml | |
| - name: Install dependencies | |
| if: matrix.dependencies-version == null | |
| run: uv pip install --system --compile "anndata[dev,test-full] @ ." -c ci/constraints.txt | |
| - name: Install minimum dependencies | |
| if: matrix.dependencies-version == 'minimum' | |
| run: | | |
| uv pip install --system --compile tomli packaging | |
| deps=$(python3 ci/scripts/min-deps.py pyproject.toml --extra dev test) | |
| uv pip install --system --compile $deps "anndata @ ." | |
| - name: Install dependencies release candidates | |
| if: matrix.dependencies-version == 'pre-release' | |
| run: uv pip install -v --system --compile --pre "anndata[dev,test-full] @ ." -c ci/constraints.txt | |
| - name: Display installed versions | |
| run: uv pip list | |
| - name: Run Pytest | |
| if: matrix.test-type == 'standard' | |
| run: pytest -n auto | |
| - name: Run Pytest (coverage) | |
| if: matrix.test-type == 'coverage' | |
| run: coverage run -m pytest -n auto --cov --cov-report=xml | |
| - name: Run Pytest (treat warnings as errors) | |
| if: matrix.test-type == 'strict-warning' | |
| run: pytest --strict-warnings -n auto | |
| - uses: codecov/codecov-action@v4 | |
| if: matrix.test-type == 'coverage' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: test-data/coverage.xml | |
| check-build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install build tools and requirements | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Display installed versions | |
| run: pip list | |
| - name: Build & Twine check | |
| run: | | |
| python -m build --sdist --wheel . | |
| twine check dist/* | |
| - name: Check runtime version | |
| run: | | |
| pip install dist/*.whl | |
| python -c 'import anndata; print(anndata.__version__)' |