Update metrics tests #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python build | |
on: | |
push: | |
paths: | |
- '.github/workflows/python-test-build.yml' | |
- 'python/**' | |
- 'src/**' | |
- 'CMakeLists.txt' | |
- 'setup.py' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04, macos-12, macos-14, windows-2022 ] | |
#python-version: [ '3.9', '3.10', '3.11', '3.12' ] | |
python-version: [ '3.9', '3.12' ] # Test only on 3.9 and 3.12 (the oldest and newest) to save time and resources | |
name: Build Python binding on ${{ matrix.os }} for Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: GCC version report | |
run: gcc --version | |
- name: CMake version report | |
run: cmake --version | |
- name: Python environment report | |
run: python -c "import sys; print(sys.version)" | |
- name: Upgrade pip and install pytest | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest scikit-learn | |
- name: Pip install | |
run: pip install . | |
- name: Run tests | |
shell: bash | |
run: pytest python/tests/test_* |