refactor: consolidate linting tools into Ruff
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -73,9 +73,9 @@ jobs:
|
||||
junit.xml
|
||||
coverage.xml
|
||||
|
||||
# ── Flake8 ─────────────────────────────────────────────────────────────
|
||||
flake8:
|
||||
name: Flake8
|
||||
# ── Lint (Ruff) ───────────────────────────────────────────────────────
|
||||
lint:
|
||||
name: Ruff Lint & Format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -86,34 +86,14 @@ jobs:
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8
|
||||
- name: Install Ruff
|
||||
run: pip install ruff
|
||||
|
||||
- name: Run Flake8
|
||||
run: flake8 app/ --max-line-length=120 --extend-ignore=E203,W503
|
||||
- name: Run Ruff Check
|
||||
run: ruff check app/ tests/
|
||||
|
||||
# ── Black ──────────────────────────────────────────────────────────────
|
||||
black:
|
||||
name: Black
|
||||
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.11"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install black
|
||||
|
||||
- name: Run Black
|
||||
run: black --check app/ --line-length=120
|
||||
- name: Run Ruff Format
|
||||
run: ruff format --check app/ tests/
|
||||
|
||||
# ── Mypy ───────────────────────────────────────────────────────────────
|
||||
mypy:
|
||||
@@ -135,56 +115,3 @@ jobs:
|
||||
|
||||
- name: Run Mypy
|
||||
run: mypy app/
|
||||
|
||||
# ── Pylint ─────────────────────────────────────────────────────────────
|
||||
pylint:
|
||||
name: Pylint
|
||||
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.11"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
|
||||
- name: Run Pylint
|
||||
run: pylint app/
|
||||
|
||||
# ── Bandit ─────────────────────────────────────────────────────────────
|
||||
bandit:
|
||||
name: Bandit
|
||||
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.11"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install bandit
|
||||
|
||||
- name: Run Bandit - Full Report
|
||||
if: ${{ !cancelled() }}
|
||||
run: bandit -r app/ -f json -o bandit-report.json || true
|
||||
|
||||
- name: Run Bandit - Fail on High/Medium
|
||||
run: bandit -r app/ -ll
|
||||
|
||||
- name: Upload Bandit Report
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bandit-report
|
||||
path: bandit-report.json
|
||||
|
||||
Reference in New Issue
Block a user