Upgrade python workflows to Morden #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Checks | |
on: [pull_request, push] | |
jobs: | |
lint_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.13' | |
- name: Cache Python dependencies | |
id: cache-pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-python-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-python- | |
- name: Install all dependencies and tools | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff bandit mypy pytest codespell | |
- name: Run Codespell check | |
run: codespell --skip "*.json,*.txt,*.pdf" || true | |
- name: Run Bandit security scan | |
run: bandit -r . || true | |
- name: Run Ruff checks with ignored rules | |
run: | | |
ruff check . --ignore B904,B905,EM101,EXE001,G004,ISC001,PLC0415,PLC1901,PLW060,PLW1641,PLW2901,PT011,PT018,PT028,S101,S311,SIM905,SLF001,UP038 | |
- name: Run Mypy type checks | |
run: mypy . --ignore-missing-imports || true | |
- name: Run Pytest tests | |
run: pytest |