Skip to content

HyperTools 2.0: modernized toolbox, interactive backend, soft clustering, comprehensive visual verification #64

HyperTools 2.0: modernized toolbox, interactive backend, soft clustering, comprehensive visual verification

HyperTools 2.0: modernized toolbox, interactive backend, soft clustering, comprehensive visual verification #64

Workflow file for this run

name: Tests
on:
push:
branches: [ master, dev, dev-2.0 ]
pull_request:
branches: [ master, dev ]
jobs:
test:
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@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Cache hypertools example datasets
uses: actions/cache@v4
with:
path: ~/hypertools_data
key: hypertools-example-data-v1
# datasets are immutable; every runner shares one cache entry so CI
# doesn't hammer the download host with 24 concurrent requests
enableCrossOsArchive: true
- name: Install system dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install system dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install ffmpeg
- name: Install system dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install ffmpeg
continue-on-error: true
- name: Install package with dev dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run pytest
env:
MPLBACKEND: Agg
run: |
pytest -v --tb=short
- name: Run pytest with coverage (Ubuntu Python 3.12 only)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
env:
MPLBACKEND: Agg
run: |
pytest --cov=hypertools --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov (Ubuntu Python 3.12 only)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- name: Generate verification screenshots (Ubuntu Python 3.12 only)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
env:
MPLBACKEND: Agg
run: |
python scripts/generate_baseline_screenshots.py
- name: Upload screenshots as artifacts (Ubuntu Python 3.12 only)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: verification-screenshots
path: tests/screenshots/
retention-days: 30