Skip to content
Closed
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
95 changes: 95 additions & 0 deletions .github/workflows/test-heavy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: "Heavy tests"

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 5 * * 0"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

test-benchmarks:
name: Benchmark tests
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
# SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL required due to
# pyLDAvis 3.3.1 having an "sklearn" dependency
run: |
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
python -m pip install -U pip
python -m pip install -U uv
python -m uv pip install -U pytest numpy

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
echo "Python version expected: ${{ matrix.python-version }}"
python --version
which python
pip list
- name: Run benchmarks
run: pytest --durations=0 -m "benchmark"

test-tune:
name: Test tuning
timeout-minutes: 90
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
# SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL required due to
# pyLDAvis 3.3.1 having an "sklearn" dependency
run: |
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
python -m pip install -U pip
python -m pip install -U uv
python -m uv pip install -U pytest numpy

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
echo "Python version expected: ${{ matrix.python-version }}"
python --version
which python
pip list
- name: Test with pytest
run: pytest --durations=0 -m "tuning_random or tuning_grid"
81 changes: 81 additions & 0 deletions .github/workflows/test-notebook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: "Notebook tests"

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 5 * * 0"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

test-notebooks:
name: Test notebooks (excluding Regression)
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out source repository
uses: actions/checkout@v7
- name: Set up Python environment
uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -U pytest pytest-xdist nbmake

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full]"
python -m ipykernel install --user --name cikernel
- name: Python version and dependency list
run: |
echo "Python version expected: 3.12"
python --version
which python
pip list
- name: Run notebooks
run: pytest --nbmake --nbmake-kernel=cikernel -n=auto --nbmake-timeout=3000 --ignore=./tutorials/translations --ignore="tutorials/Tutorial - Regression.ipynb" ./tutorials/

test-notebooks-regression:
name: Test notebook (Regression)
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out source repository
uses: actions/checkout@v7
- name: Set up Python environment
uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -U pytest pytest-xdist nbmake

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full]"
python -m ipykernel install --user --name cikernel
- name: Python version and dependency list
run: |
echo "Python version expected: 3.12"
python --version
which python
pip list
- name: Run notebook
run: pytest --nbmake --nbmake-kernel=cikernel --nbmake-timeout=3000 "tutorials/Tutorial - Regression.ipynb"
157 changes: 2 additions & 155 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pycaret
name: "Main tests"

on:
push:
Expand All @@ -13,6 +13,7 @@ concurrency:
cancel-in-progress: true

jobs:

code-quality:
runs-on: ubuntu-latest
name: Code quality checks
Expand All @@ -33,7 +34,6 @@ jobs:
# JOBS MUST START WITH test !!!!
test-docs-build:
name: Documentation build
needs: code-quality
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -52,7 +52,6 @@ jobs:
run: sphinx-build -j auto -W --keep-going -b html docs/source docs/build/html
test-docs-linkchecker:
name: Documentation link checker
needs: code-quality
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -70,77 +69,8 @@ jobs:
- name: Check links
run: sphinx-build -j auto -W --keep-going -b linkcheck docs/source docs/build/linkcheck

test-notebooks-regression:
name: Test notebook (Regression)
needs: code-quality
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out source repository
uses: actions/checkout@v7
- name: Set up Python environment
uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -U pytest pytest-xdist nbmake

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full]"
python -m ipykernel install --user --name cikernel
- name: Python version and dependency list
run: |
echo "Python version expected: 3.12"
python --version
which python
pip list
- name: Run notebook
run: pytest --nbmake --nbmake-kernel=cikernel --nbmake-timeout=3000 "tutorials/Tutorial - Regression.ipynb"

test-notebooks:
name: Test notebooks (excluding Regression)
needs: code-quality
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out source repository
uses: actions/checkout@v7
- name: Set up Python environment
uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -U pytest pytest-xdist nbmake

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full]"
python -m ipykernel install --user --name cikernel
- name: Python version and dependency list
run: |
echo "Python version expected: 3.12"
python --version
which python
pip list
- name: Run notebooks
run: pytest --nbmake --nbmake-kernel=cikernel -n=auto --nbmake-timeout=3000 --ignore=./tutorials/translations --ignore="tutorials/Tutorial - Regression.ipynb" ./tutorials/

test:
name: Full tests (py-${{ matrix.python-version }}, ${{ matrix.os }})
needs: code-quality
runs-on: ${{ matrix.os }}
timeout-minutes: 180
strategy:
Expand Down Expand Up @@ -186,7 +116,6 @@ jobs:

test-plots:
name: Test plotting
needs: code-quality
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -223,85 +152,3 @@ jobs:
pip list
- name: Test with pytest
run: pytest --durations=0 -m "plotting"

test-tune:
name: Test tuning
needs: code-quality
timeout-minutes: 90
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
# SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL required due to
# pyLDAvis 3.3.1 having an "sklearn" dependency
run: |
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
python -m pip install -U pip
python -m pip install -U uv
python -m uv pip install -U pytest numpy

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
echo "Python version expected: ${{ matrix.python-version }}"
python --version
which python
pip list
- name: Test with pytest
run: pytest --durations=0 -m "tuning_random or tuning_grid"

test-benchmarks:
name: Benchmark tests
needs: code-quality
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
# SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL required due to
# pyLDAvis 3.3.1 having an "sklearn" dependency
run: |
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
python -m pip install -U pip
python -m pip install -U uv
python -m uv pip install -U pytest numpy

# https://github.com/yaml/pyyaml/issues/736
echo 'Cython < 3.0' > /tmp/constraint.txt
PIP_BUILD_CONSTRAINT=/tmp/constraint.txt pip wheel PyYAML==5.4.1

python -m uv pip install ".[full, test]"
if [ -f requirements-prophet.txt ]; then pip install -r requirements-prophet.txt; fi
- name: Python version and dependency list
run: |
echo "Python version expected: ${{ matrix.python-version }}"
python --version
which python
pip list
- name: Run benchmarks
run: pytest --durations=0 -m "benchmark"
Loading