Skip to content

Commit a373646

Browse files
Merge pull request #2836 from lighting9999/path-2
Upgrade python workflows to Morden
2 parents 6c97849 + 67a34ef commit a373646

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 Checks
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
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 all dependencies and tools
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install ruff bandit mypy pytest codespell
30+
31+
- name: Run Codespell check
32+
run: codespell --skip "*.json,*.txt,*.pdf" || true
33+
34+
- name: Run Bandit security scan
35+
run: bandit -r . || true
36+
37+
- name: Run Ruff checks with ignored rules
38+
run: |
39+
ruff check . --ignore B904,B905,EM101,EXE001,G004,ISC001,PLC0415,PLC1901,PLW060,PLW1641,PLW2901,PT011,PT018,PT028,S101,S311,SIM905,SLF001,UP038
40+
41+
- name: Run Mypy type checks
42+
run: mypy . --ignore-missing-imports || true
43+
44+
- name: Run Pytest tests
45+
run: pytest

0 commit comments

Comments
 (0)