Skip to content

Python checks

Python checks #23

Workflow file for this run

name: Python checks
on:
push:
paths:
- "**.py"
- .github/workflows/python-checks.yml
- pylintrc
schedule:
- cron: "0 0 * * 0"
jobs:
checks:
name: Python checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
# This is what Raspbian is using.
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run flake8
run: |
pip install flake8
flake8 **.py
- name: Run pylint
run: |
pip install pylint
pylint **.py
- name: Run black in check mode
run: |
pip install black
black --check **.py
- name: Run isort in check mode
run: |
pip install isort
isort **.py --check --diff
- name: Run pytest
run: |
pip install pytest
pytest