Skip to content

Ensure tests are deterministic and faster #50

Ensure tests are deterministic and faster

Ensure tests are deterministic and faster #50

Workflow file for this run

name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.9"]
steps:
- uses: actions/checkout@v3
- 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 flake8 mypy pytest black colorama
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run tests with pytest
run: |
python -m pytest -v
- name: Lint with flake8
run: |
python -m flake8 . --count --statistics
- name: Run mypy
run: |
python -m mypy --strict simple_pid
- name: Run black
run: |
python -m black -l 100 -S --check --diff --color --exclude "docs/" .