Skip to content

Workflow file for this run

name: Unit and Integration tests
on:
push:
branches-ignore:
- main
pull_request:
branches: [ main ]
jobs:
tests:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
- name: Run tests with pytest
run: |
python -m unittest discover -v tests/unit
python -m unittest discover -v tests/integration
flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
isort:
name: Isort
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install isort
- name: Sort imports with isort
run: isort --multi-line 3 --profile black .
mypy:
name: MyPy
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Checkout
uses: actions/checkout@v4
- name: Install mypy
run: |
python3 -m pip install --upgrade pip
python3 -m pip install mypy
- name: Run mypy
uses: jpetrucciani/mypy-check@master
with:
python_version: ${{ matrix.python-version }}