Skip to content

Fix cupy pytest errors #179

Fix cupy pytest errors

Fix cupy pytest errors #179

Workflow file for this run

name: test_and_deploy
on:
push:
branches:
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request: null
workflow_dispatch: null
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Conda Environment
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
use-mamba: true
python-version: ${{ matrix.python-version }}
environment-file: continuous_integration/environment-${{ matrix.python-version }}.yml
activate-environment: dask-image-testenv
auto-activate-base: false
- name: Install dask-image
shell: bash -l {0}
run: |
conda activate dask-image-testenv
python -m pip install -e .
conda list
- name: Run tests
shell: bash -l {0}
run: pytest -v --cov=dask_image --cov-report lcov
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.test_number }}
parallel: true
path-to-lcov: coverage.lcov
coveralls:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
deploy:
# This will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
#
# This job will run when you have tagged a commit, starting with "v*"
# or created a release in GitHub which includes a tag starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*