Skip to content

Python pytest

Python pytest #355

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 pytest
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# since * is a special character in YAML you have to quote this string
- cron: '0 22 1/7 * *'
jobs:
test_default:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] #catboost not release for py311 yet
python-version: ["3.7", "3.8", "3.9", "3.10"]
# include:
# - os: ubuntu-20.04
# python-version: 3.6
include:
- os: ubuntu-latest
python-version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q git+https://github.com/DataCanvasIO/Hypernets
# pip install git+https://github.com/DataCanvasIO/HyperBoard.git#subdirectory=hboard-widget
# pip install git+https://github.com/DataCanvasIO/HyperBoard.git#subdirectory=hboard
pip install -q -r requirements.txt -r requirements-fg.txt -r requirements-dask.txt -r requirements-shap.txt
pip install -q "numpy<=1.23.5" pytest-cov==2.4.0 python-coveralls codacy-coverage # NOTE: shap is not working with numpy==1.24 now, for further info: https://github.com/slundberg/shap/pull/1890
pip list
- name: Test with pytest
run: |
pytest --cov=hypergbm --durations=30
test_with_py36:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["3.6", ]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q git+https://github.com/DataCanvasIO/Hypernets
pip install -q -r requirements.txt -r requirements-fg.txt -r requirements-dask.txt -r requirements-shap.txt
pip install -q pytest-cov==2.4.0 python-coveralls codacy-coverage
pip list
- name: Test with pytest
run: |
pytest --cov=hypergbm --durations=30
test_with_sk024_cb026:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -q "featuretools<1.0" "scikit-learn<1.0" "catboost<1.0"
pip install -q git+https://github.com/DataCanvasIO/Hypernets
pip install -q -r requirements.txt "scikit-learn<1.0"
pip install -q "numpy<=1.23.5" pytest-cov==2.4.0 python-coveralls codacy-coverage # TODO remove numpy version limit
pip list
- name: Test with pytest
run: |
pytest --cov=hypergbm --durations=30