Skip to content

Added numpy constraint for testing #24

Added numpy constraint for testing

Added numpy constraint for testing #24

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install libomp (macOS)
if: runner.os == 'macOS'
run: |
brew install libomp
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools>=77.0.3 uv
uv pip install --system "git+https://github.com/KulikDM/pyclustering.git@Warning-Fix"
uv pip install --system -e '.[dev]' --no-build-isolation
- name: Lint with Ruff
run: ruff check .
- name: Check formatting
run: ruff format --check .
- name: Test with pytest
run: |
pytest -q -r f --doctest-modules --cov-fail-under=90 --cov-branch --cov=pythresh --cov-report=term-missing --cov-report=xml --continue-on-collection-errors
- name: Upload coverage to Codecov (partial)
uses: codecov/codecov-action@v6
with:
files: ./coverage.xml
flags: ${{ matrix.os }}-${{ matrix.python-version }}
fail_ci_if_error: true
verbose: true
partial: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
finalize:
needs: build
runs-on: ubuntu-latest
steps:
- name: Finalize Codecov uploads
uses: codecov/codecov-action@v6
with:
finalize: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}