ENH: support 2d images on slice_image function #198
This file contains 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-pytest | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
# Updates or changes to this, or the runner OS or arch will invalidate the cache | |
python_version: "3.10" # Python version to use for testing - update when needed | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
# Default shell needs to be bash for conda | |
# https://github.com/conda-incubator/setup-miniconda?tab=readme-ov-file#important | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3, devs recommend using hash | |
with: | |
miniconda-version: "latest" | |
python-version: ${{ env.python_version }} | |
auto-update-conda: true | |
activate-environment: "test-env" | |
- name: Configure Conda to use only .tar.bz2 | |
run: | | |
conda config --set use_only_tar_bz2 true | |
- name: Checkout code | |
uses: actions/checkout@v4 # Checkout PR code to 'antspy-pr' | |
with: | |
path: antspy-pr | |
- name: Install dependencies and ANTsPy from PR | |
run: | | |
conda create -n antspy-env python=${{ env.python_version }} -y | |
conda activate antspy-env | |
conda install -c conda-forge conda-pack coverage | |
conda info | |
pip install ./antspy-pr | |
conda list | |
antspy-pr/tests/run_tests.sh -c | |
conda pack -n antspy-env -o ~/conda-env.tar.bz2 | |
- name: Run tests | |
run: | | |
conda activate antspy-env | |
bash antspy-pr/tests/run_tests.sh -c | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
files: antspy-pr/tests/coverage.xml |