Skip to content

ci: add GitHub Actions for Unit Tests (3.11/3.12) and Code Quality & … #1

ci: add GitHub Actions for Unit Tests (3.11/3.12) and Code Quality & …

ci: add GitHub Actions for Unit Tests (3.11/3.12) and Code Quality & … #1

Workflow file for this run

name: Code Quality & Security
on:
pull_request:
branches: [ main ]
push:
branches: [ feature/*, fix/* ]
jobs:
quality:
name: Code Quality & Security
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8 bandit
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || true
flake8 . --count --exit-zero --max-complexity=25 --max-line-length=120 --statistics
- name: Security scan with bandit
run: |
bandit -q -r . || true