Merge some actions in one file

This commit is contained in:
2026-03-17 20:39:20 +01:00
parent 349967fdb3
commit 42933d9ae8
4 changed files with 14 additions and 108 deletions

View File

@ -0,0 +1,48 @@
---
name: Linting
on:
push:
branches: [main]
pull_request:
branches: [main]
# XXX need to do stuff with uv
jobs:
linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '${{ matrix.python-version }}'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Analyse code with Pylint
run: |
pylint $(git ls-files '*.py')
- name: Analyse code with Flake8
run: |
flake8 $(git ls-files '*.py')
- name: Analyse code with Mypy
run: |
mypy --install-types --non-interactive $(git ls-files '*.py')
- name: Analyse code with Bandit
run: |
bandit -x '**/test_*.py,./.venv/**' -r .