Skip to content

Initial new API

Initial new API #634

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main, "release/*"]
workflow_dispatch:
# Cancel actions when new commits are pushed to PR
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 70
strategy:
fail-fast: false
matrix:
#os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: latest
python-version: ${{ matrix.python-version }}
use-mamba: true
- name: Install dependencies
shell: bash -el {0}
run: |
case "${{ matrix.os }}" in
"ubuntu-latest")
export PLATFORM="linux"
;;
"macOS-latest")
export PLATFORM="macos"
;;
"windows-latest")
export PLATFORM="windows"
;;
esac
conda activate test
conda install -c conda-forge -n test fortran-compiler blas-devel
pip install greenlet
# need numpy for some builds. make sure to install a compatible version
grep -E '^numpy==' requirements/$PLATFORM/test-requirements.txt | xargs -n 1 pip install
pip install -r requirements/$PLATFORM/test-requirements.txt
pip install .
- name: List dependencies
shell: bash -el {0}
run: |
python -m pip list
- name: Run pytest
shell: bash -el {0}
run: |
python -m pytest -v
# upload code coverage report
code-coverage:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: latest
python-version: "3.10"
- name: Install dependencies
shell: bash -el {0}
run: |
conda activate test
conda install -c conda-forge -n test pip fftw gfortran blas-devel
# need numpy for some builds. make sure to install a compatible version
grep -E '^numpy==' requirements/linux/test-requirements.txt | xargs -n 1 pip install
pip install -r requirements/linux/test-requirements.txt
pip install .
- name: Run tests and collect coverage
shell: bash -el {0}
run: pytest --cov cyto_dl
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3