Tests 77/merge #869
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
name: Tests | |
run-name: Tests ${{ github.ref_name }} | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
types: [opened, edited, reopen, synchronize, ready_for_review] | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Linters/Type Checkers | |
strategy: | |
fail-fast: false | |
matrix: | |
python: [3.8, 3.12] | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install | |
run: pip install -e '.[linting]' | |
- name: Run flake8 | |
run: python3 -m flake8 . | |
- name: Run mypy | |
run: python3 -m mypy | |
test: | |
name: Unit Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
python: [3.8, 3.12] | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install | |
run: | | |
pip install -e '.[testing,notifications]' | |
sudo apt update | |
sudo apt install ffmpeg | |
- name: Run pytest (with coverage) | |
run: python3 -m coverage run -m pytest -s -v test/ | |
env: | |
S3_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.AWS_S3_SECRET_KEY }} | |
- name: Display coverage report | |
run: python3 -m coverage report --omit=config* | |