Skip to content

Add Bandit to linters #62

Add Bandit to linters

Add Bandit to linters #62

Workflow file for this run

name: Code Quality Checks
on:
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.8.0 isort==5.13.2 bandit[toml]
- name: Make Bandit helper executable
run: chmod +x scripts/linters/run_bandit.sh
- name: Run Black
run: black --check .
- name: Run Isort
run: isort --check-only .
- name: Run Bandit
run: ./scripts/linters/run_bandit.sh
# - name: Run Flake8
# run: flake8 .
# - name: Run MyPy
# run: mypy .