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
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
permissions:
id-token: write # to authenticate as Trusted Publisher to pypi.org
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.x"
cache: "pip"
cache: pip
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
35 changes: 23 additions & 12 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ on:

jobs:
test:
strategy:
matrix:
python-version: ["3.9", "3.13"]
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install project and dependencies
Expand All @@ -30,23 +32,32 @@ jobs:
- name: Run test suite
run: pytest -v --color=yes

check:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
filter: blob:none
fetch-depth: 0

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
# cache: pip # TODO: cache tools

python-version: "3.x"
cache: pip
- name: Install tools
run: pip install twine build

- name: Build and check
run: |
python -m build
twine check dist/*.whl

check:
if: always()
needs:
- build
- test
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/alls-green#why
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "BSD-3-Clause"
urls.Source = "https://github.com/scikit-learn-contrib/sklearn-ann"
urls.Documentation = "https://sklearn-ann.readthedocs.io/"
dynamic = ["version", "readme"]
requires-python = "<3.13,>=3.9" # enforced by scipy
requires-python = ">=3.9"
dependencies = [
"scikit-learn>=1.6.0",
"scipy>=1.11.1,<2.0.0",
Expand Down