Skip to content

Maintenance

Maintenance #76

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: scikit-hubness CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
exclude:
# Building nmslib from source fails on Windows: issue #102
- os: windows-latest
python: "3.9"
- os: windows-latest
python: "3.10"
- os: windows-latest
python: "3.11"
- os: windows-latest
python: "3.12"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel pybind11
- name: Install ANN packages with special care
run: |
scripts/install-ngt.sh
scripts/install-puffinn.sh
scripts/install-nmslib.sh
- name: Install scikit-hubness
run: |
echo "Running on platform.system()=$(python -c 'import platform; print(platform.system())')"
python3 -m pip install .[ann,tests]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exit-zero
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov=skhubness --cov-append
- name: Test coverage
run: coverage html
- name: Codecov
run: codecov