-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.33 KB
/
code-quality.yml
File metadata and controls
58 lines (47 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Code Quality
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
lint-and-type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
uv pip install --system -e ".[dev]"
uv pip install --system mypy ruff
- name: Lint with ruff
run: |
ruff check permitcheck/ --output-format=github
continue-on-error: true
- name: Format check with ruff
run: |
ruff format --check permitcheck/
continue-on-error: true
- name: Type check with mypy
run: |
mypy permitcheck/ --ignore-missing-imports --no-strict-optional
continue-on-error: true
- name: Check for security issues
run: |
uv pip install --system bandit
bandit -r permitcheck/ -f json -o bandit-report.json || true
continue-on-error: true
- name: Upload reports
uses: actions/upload-artifact@v4
if: always()
with:
name: code-quality-reports
path: |
bandit-report.json