Skip to content

Merge pull request #64 from bbc/fix-publish #197

Merge pull request #64 from bbc/fix-publish

Merge pull request #64 from bbc/fix-publish #197

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: Build, Test and Lint
on: [push, pull_request]
jobs:
build_and_test:
name: Build/test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install FFMPEG (Windows-only)
if: ${{ matrix.os == 'windows-latest' }}
uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
- name: Install FFMPEG (Non-Windows)
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install ffmpeg
elif [ "$RUNNER_OS" == "Linux" ]; then
# apt-spy needed because of issues with the default APT repos for Workflow hosts - https://github.com/actions/runner-images/issues/675
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
sudo apt install -y ffmpeg
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
pip install .
- name: Lint with black
uses: psf/black@stable
with:
version: "22.3.0"
- name: Test with pytest
run: |
pytest