-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.05 KB
/
static-analysis.yml
File metadata and controls
49 lines (40 loc) · 1.05 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
# Static analysis: Ruff (lint/format) and mypy (type checking).
# Fail on any violation so new issues cannot be introduced.
name: Static analysis
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
pip install -e ".[dev]"
- name: Ruff check
run: ruff check src tests scripts alembic
mypy:
name: Mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Mypy
run: mypy src tests scripts