Skip to content

CFE-4632: Added python linting in github actions #38

CFE-4632: Added python linting in github actions

CFE-4632: Added python linting in github actions #38

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
unit_tests:
name: Run Unit Tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update -y && sudo apt-get install -y python3
pip install flake8 pyright black pyflakes ansible
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install cfbs
run: pip install cfbs
- name: Check the status with cfbs
run: cfbs status
- name: Validate with cfbs
run: cfbs validate
- name: Check the formatting
run: cfbs --check pretty ./cfbs.json
- name: Lint with flake8
run: |
flake8 . --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160
- name: Lint with pyright (type checking)
run: |
pyright .
- name: Check formatting with black
run: |
shopt -s globstar
black --check .
- name: Run pyflakes
run: |
pyflakes .