Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: tests

on:
on:
push:
branches:
- main
Expand All @@ -14,7 +14,7 @@ on:
- main
workflow_dispatch:

jobs:
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
Expand All @@ -26,10 +26,12 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -45,21 +47,25 @@ jobs:

deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# 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@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine

- name: Build and publish
env:
TWINE_USERNAME: __token__
Expand Down
18 changes: 13 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,40 @@ python =
3.10: py310
3.11: py311
fail_on_no_env = True

[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
windows-latest: windows

[testenv]
platform =
platform =
macos: darwin
linux: linux
windows: win32
passenv =
passenv =
CI
GITHUB_ACTIONS
DISPLAY,XAUTHORITY
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
PYVISTA_OFF_SCREEN
TEMP
TMP
TMPDIR
TORCHINDUCTOR_CACHE_DIR
setenv =
windows: TORCHINDUCTOR_CACHE_DIR = {env:TEMP}{/}torchinductor
macos: TORCHINDUCTOR_CACHE_DIR = {env:TMPDIR}{/}torchinductor
linux: TORCHINDUCTOR_CACHE_DIR = {env:TMPDIR:/tmp}{/}torchinductor
extras = gui
deps =
deps =
.[gui]
py
pytest
pytest-cov
pytest-xvfb
# ignoring contrib tests for now
commands =
commands =
#linux: apt-get update && apt-get install libgl1
pytest -vv -rA --color=yes --cov=cellpose --cov-report=xml --ignore=tests/contrib --durations=0