Add Python 3.10 build testing #71
Workflow file for this run
This file contains 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
# 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"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install FFMPEG (Windows-only) | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: FedericoCarboni/setup-ffmpeg@v1 | |
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@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest | |
if [ -f requirements.txt ]; then echo "requirements.txt"; cat requirements.txt; pip install -r requirements.txt; fi | |
- name: Lint with black | |
uses: psf/black@stable | |
with: | |
version: "22.3.0" | |
- name: Test with pytest | |
run: | | |
pytest |