Skip to content

Commit

Permalink
update install and test structure
Browse files Browse the repository at this point in the history
  • Loading branch information
guiwitz committed Dec 13, 2024
1 parent f78e55f commit b83bc9a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 34 deletions.
56 changes: 30 additions & 26 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: build

on:
on:
push:
branches:
- master
tags:
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
#pull_request:
# branches:
# - master
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- master
workflow_dispatch:

jobs:
Expand All @@ -17,13 +19,13 @@ jobs:
fail-fast: false
matrix:
platform: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ 3.7, 3.8, 3.9 ]
python-version: [ 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

Expand All @@ -40,32 +42,34 @@ 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 ]
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags/v')

permissions:
# IMPORTANT: this permission is mandatory for trusted publishing on PyPi
# see https://docs.pypi.org/trusted-publishers/
id-token: write
# This permission allows writing releases
contents: write

if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine build
- name: build wheels
run: |
python -m build
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: 🚢 Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
#with:
# repository-url: https://test.pypi.org/legacy/
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ classifiers =
[options]
packages = find:
python_requires = >=3.7
setup_requires = setuptools_scm
install_requires =
numpy
scikit-image
Expand Down
5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{37,38,39}-{linux,macos,windows}
envlist = py{39,310,311,312}-{linux,macos,windows}
isolated_build=true

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[gh-actions:env]
PLATFORM =
Expand Down

0 comments on commit b83bc9a

Please sign in to comment.