Add post-build script to fix animated GIF thumbnails #15
This file contains hidden or 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: Tests | |
on: | |
push: | |
branches: [ master, dev ] | |
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.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }}- | |
${{ runner.os }}-pip- | |
- 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 Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov | |
pip install -r requirements.txt | |
- name: Install package in development mode | |
run: | | |
pip install -e . | |
- name: Run pytest | |
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' | |
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@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false |