Skip to content

Commit 8afbb79

Browse files
committed
Upgrade python workflows to Morden
1 parent d5f4d19 commit 8afbb79

File tree

2 files changed

+45
-24
lines changed

2 files changed

+45
-24
lines changed

.github/workflows/lint_python.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/python.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Python
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
lint_test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v2
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.13'
16+
17+
- name: Cache Python dependencies
18+
id: cache-pip
19+
uses: actions/cache@v3
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-python-${{ hashFiles('**/requirements.txt') }}
23+
restore-keys: |
24+
${{ runner.os }}-python-
25+
26+
- name: Install dependencies and linters
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install ruff bandit mypy pytest codespell -r requirements.txt || pip install --editable .
30+
31+
- name: Run Ruff checks with ignored rules
32+
run: |
33+
ruff check . --ignore B904,B905,EM101,EXE001,G004,ISC001,PLC0415,PLC1901,PLW060,PLW1641,PLW2901,PT011,PT018,PT028,S101,S311,SIM905,SLF001,UP038
34+
35+
- name: Run Mypy type checks
36+
run: mypy . --ignore-missing-imports || true
37+
38+
- name: Run Codespell check
39+
run: codespell || true
40+
41+
- name: Run Bandit security scan
42+
run: bandit -r . || true
43+
44+
- name: Run Pytest tests
45+
run: pytest

0 commit comments

Comments
 (0)