Update minimum versions in dependencies
(#374)
#192
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: 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", "3.12"] | |
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/[email protected] | |
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/[email protected] | |
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 build twine | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python -m build | |
twine upload dist/* |